File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ALTER TABLE " storage" ." objects"
2- ADD CONSTRAINT objects_name_check
3- CHECK (
4- name !~ E' [\\ x00-\\ x08\\ x0B\\ x0C\\ x0E-\\ x1F]'
5- AND POSITION(U&' \F FFE' IN name) = 0
6- AND POSITION(U&' \F FFF' IN name) = 0
7- );
1+ DO $$
2+ BEGIN
3+ IF NOT EXISTS (
4+ SELECT 1
5+ FROM pg_constraint c
6+ JOIN pg_class t ON t .oid = c .conrelid
7+ JOIN pg_namespace n ON n .oid = t .relnamespace
8+ WHERE c .conname = ' objects_name_check'
9+ AND n .nspname = ' storage'
10+ AND t .relname = ' objects'
11+ ) THEN
12+ ALTER TABLE " storage" ." objects"
13+ ADD CONSTRAINT objects_name_check
14+ CHECK (
15+ name !~ E' [\\ x00-\\ x08\\ x0B\\ x0C\\ x0E-\\ x1F]'
16+ AND POSITION(U&' \F FFE' IN name) = 0
17+ AND POSITION(U&' \F FFF' IN name) = 0
18+ );
19+ END IF;
20+ END
21+ $$;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function main() {
3939
4040 const template = `export const DBMigration = {
4141${ migrationsEnum . join ( '\n' ) }
42- }
42+ } as const
4343`
4444
4545 const destinationPath = path . resolve (
You can’t perform that action at this time.
0 commit comments