Skip to content

Commit 09890f0

Browse files
authored
fix: sdl support excluding cockroachdb and redshift (#929)
1 parent 0f8e30a commit 09890f0

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

mintlify/gitops/state-based-workflow/limitations.mdx

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ State-based workflow (SDL) currently has these limitations:
77
## Database Support
88

99
**Supported:**
10+
1011
- PostgreSQL
11-
- CockroachDB
12-
- Redshift (PostgreSQL-compatible)
1312

1413
**Not yet supported:**
14+
1515
- MySQL
1616
- SQL Server
1717
- Oracle
@@ -30,6 +30,7 @@ Only these PostgreSQL statements are supported:
3030
- `ALTER SEQUENCE` (for OWNED BY)
3131

3232
**Not supported:**
33+
3334
- Complex stored procedures
3435
- Triggers
3536
- Row-level security policies
@@ -42,12 +43,14 @@ Only these PostgreSQL statements are supported:
4243
SDL requires strict adherence to conventions:
4344

4445
1. **All objects must use fully qualified names** (with schema prefix)
46+
4547
```sql
4648
-- Required: public.users
4749
-- Not allowed: users
4850
```
4951

5052
2. **PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK must be table-level with explicit names**
53+
5154
```sql
5255
-- Correct:
5356
CONSTRAINT users_pkey PRIMARY KEY (id)
@@ -57,6 +60,7 @@ SDL requires strict adherence to conventions:
5760
```
5861

5962
3. **Only NOT NULL, DEFAULT, GENERATED allowed at column level**
63+
6064
```sql
6165
-- Allowed:
6266
id SERIAL,
@@ -68,6 +72,7 @@ SDL requires strict adherence to conventions:
6872
```
6973

7074
4. **Foreign key references must be fully qualified**
75+
7176
```sql
7277
-- Required:
7378
REFERENCES public.users(id)
@@ -77,6 +82,7 @@ SDL requires strict adherence to conventions:
7782
```
7883

7984
5. **All indexes must have explicit names**
85+
8086
```sql
8187
-- Required:
8288
CREATE INDEX idx_users_email ON public.users(email)
@@ -90,12 +96,14 @@ SDL requires strict adherence to conventions:
9096
SDL only manages schema structure. For data operations, use migration-based workflow.
9197

9298
**Not supported in SDL:**
99+
93100
- INSERT statements
94101
- UPDATE statements
95102
- DELETE statements
96103
- Data transformation logic
97104

98105
**Solution:** Combine both workflows:
106+
99107
```
100108
schema/ # SDL for schema structure
101109
├── tables.sql
@@ -115,7 +123,8 @@ SDL-generated DROP statements execute automatically when objects are removed fro
115123
```
116124

117125
<Warning>
118-
Always backup data before deploying SDL changes that remove objects from schema files. Bytebase will automatically drop those objects.
126+
Always backup data before deploying SDL changes that remove objects from schema files. Bytebase
127+
will automatically drop those objects.
119128
</Warning>
120129

121130
## Limited Rollback
@@ -126,7 +135,11 @@ SDL only moves forward to new desired states:
126135
- To rollback: revert SDL files to previous state and redeploy
127136
- Data in dropped objects is lost (backup required)
128137

129-
<Card title="Schema Rollback Strategies" icon="rotate-left" href="/change-database/rollback-schema-changes">
138+
<Card
139+
title="Schema Rollback Strategies"
140+
icon="rotate-left"
141+
href="/change-database/rollback-schema-changes"
142+
>
130143
Approaches for reversing schema changes
131144
</Card>
132145

@@ -139,6 +152,7 @@ For large schemas:
139152
- DDL generation uses topological sort (handles dependencies)
140153

141154
**Mitigation:**
155+
142156
- Organize schema into multiple files
143157
- Use database groups for fleet management
144158
- Test SDL workflow on staging first
@@ -152,13 +166,15 @@ For large schemas:
152166
Learn about the imperative alternative
153167
</Card>
154168

155-
<Card title="Best Practices" icon="lightbulb" href="/gitops/best-practices/overview">
156-
Production-ready workflow patterns
157-
</Card>
169+
{' '}
170+
<Card title="Best Practices" icon="lightbulb" href="/gitops/best-practices/overview">
171+
Production-ready workflow patterns
172+
</Card>
158173

159-
<Card title="Troubleshooting" icon="wrench" href="/gitops/troubleshooting/overview">
160-
Solutions for common issues
161-
</Card>
174+
{' '}
175+
<Card title="Troubleshooting" icon="wrench" href="/gitops/troubleshooting/overview">
176+
Solutions for common issues
177+
</Card>
162178

163179
<Card title="GitOps Overview" icon="arrow-left" href="/gitops/overview">
164180
Return to GitOps overview

0 commit comments

Comments
 (0)