95f8e9a70b
Postgres en_US.utf8 collation sorts case-insensitively, breaking the lexicographic fractional indexing. Setting COLLATE "C" ensures pure byte-order sorting. Applied via setup-collation.sql in entrypoint after prisma db push. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 lines
378 B
SQL
7 lines
378 B
SQL
-- Set COLLATE "C" on position columns so fractional indexing sorts correctly.
|
|
-- en_US.utf8 collation is case-insensitive and breaks lexicographic ordering.
|
|
-- This must run after prisma db push since push may reset column types.
|
|
|
|
ALTER TABLE columns ALTER COLUMN position SET DATA TYPE text COLLATE "C";
|
|
ALTER TABLE cards ALTER COLUMN position SET DATA TYPE text COLLATE "C";
|