mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 19:06:34 +00:00
fix: exclude setup_state from UUIDv7 migration
setup_state is a singleton (INTEGER PK CHECK(id=1)), not an entity. Converting its id to TEXT breaks the CHECK constraint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
108123fb86
commit
fe9c51d3f0
1 changed files with 1 additions and 1 deletions
|
|
@ -529,7 +529,7 @@ export const TENANT_MIGRATIONS: readonly string[] = [
|
||||||
c.column_name = 'id'
|
c.column_name = 'id'
|
||||||
OR c.column_name LIKE '%_id'
|
OR c.column_name LIKE '%_id'
|
||||||
)
|
)
|
||||||
AND c.table_name NOT IN ('schema_migrations')
|
AND c.table_name NOT IN ('schema_migrations', 'setup_state')
|
||||||
LOOP
|
LOOP
|
||||||
EXECUTE format('ALTER TABLE %I ALTER COLUMN %I TYPE TEXT USING %I::TEXT',
|
EXECUTE format('ALTER TABLE %I ALTER COLUMN %I TYPE TEXT USING %I::TEXT',
|
||||||
r.table_name, r.column_name, r.column_name);
|
r.table_name, r.column_name, r.column_name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue