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:
Mitchell R 2026-05-26 13:28:53 +02:00
parent 108123fb86
commit fe9c51d3f0
No known key found for this signature in database

View file

@ -529,7 +529,7 @@ export const TENANT_MIGRATIONS: readonly string[] = [
c.column_name = '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
EXECUTE format('ALTER TABLE %I ALTER COLUMN %I TYPE TEXT USING %I::TEXT',
r.table_name, r.column_name, r.column_name);