Import database in a single transaction
@@ -3,9 +3,7 @@ BEGIN;
{{~#each tables}}
ALTER TABLE "{{this.name}}" DISABLE TRIGGER ALL;
{{~/each}}
-COMMIT;
-BEGIN;
-- Set defaults for non-nullable columns not included in the dump.
{{~#each tables as |table|}}
{{~#each column_defaults}}
@@ -29,9 +27,7 @@ BEGIN;
ALTER TABLE "{{table.name}}" ALTER COLUMN "{{@key}}" DROP DEFAULT;
{{~/each}}
{{~/each}}
-COMMIT;
-BEGIN;
-- Reenable triggers on each table.
{{~#each tables}}
ALTER TABLE "{{this.name}}" ENABLE TRIGGER ALL;
