Skip to content

Commit 7415074

Browse files
committed
Import database in a single transaction
1 parent b2abc10 commit 7415074

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/tasks/dump_db/dump-import.sql.hbs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ BEGIN;
33
{{~#each tables}}
44
ALTER TABLE "{{this.name}}" DISABLE TRIGGER ALL;
55
{{~/each}}
6-
COMMIT;
76

8-
BEGIN;
97
-- Set defaults for non-nullable columns not included in the dump.
108
{{~#each tables as |table|}}
119
{{~#each column_defaults}}
@@ -29,9 +27,7 @@ BEGIN;
2927
ALTER TABLE "{{table.name}}" ALTER COLUMN "{{@key}}" DROP DEFAULT;
3028
{{~/each}}
3129
{{~/each}}
32-
COMMIT;
3330

34-
BEGIN;
3531
-- Reenable triggers on each table.
3632
{{~#each tables}}
3733
ALTER TABLE "{{this.name}}" ENABLE TRIGGER ALL;

0 commit comments

Comments
 (0)