You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sysdb_migrations/internal/migrations.ts
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -657,5 +657,15 @@ export function allMigrations(
657
657
]
658
658
: [],
659
659
},
660
+
// ADD COLUMN with no default is catalog-only; the GIN index built in the same
661
+
// transaction covers zero rows, so no CONCURRENTLY is needed. The index serves
662
+
// containment (@>) filters on workflow attributes; on CockroachDB, USING GIN
663
+
// creates an inverted index.
664
+
{
665
+
pg: [
666
+
`ALTER TABLE "${schemaName}"."workflow_status" ADD COLUMN IF NOT EXISTS "attributes" JSONB`,
667
+
`CREATE INDEX IF NOT EXISTS "idx_workflow_status_attributes" ON "${schemaName}"."workflow_status" USING GIN ("attributes") WHERE "attributes" IS NOT NULL`,
0 commit comments