Skip to content

Commit aea5b8c

Browse files
authored
fix(api): remove VACUUM from wipe-staging.sql (#128)
VACUUM cannot be executed inside a transaction, and Wrangler wraps SQL file execution in a transaction. This was causing staging deployments to fail with 'cannot VACUUM from within a transaction'.
1 parent b821af7 commit aea5b8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/api/scripts/wipe-staging.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,6 @@ DROP TABLE IF EXISTS global_settings;
8787
DROP TABLE IF EXISTS d1_migrations;
8888
DROP TABLE IF EXISTS __drizzle_migrations;
8989

90-
-- Vacuum to reclaim space
91-
VACUUM;
90+
-- Note: VACUUM cannot run inside a transaction (SQLite limitation)
91+
-- D1/Wrangler wraps SQL file execution in a transaction, so we skip VACUUM here.
92+
-- Space will be reclaimed automatically by SQLite over time.

0 commit comments

Comments
 (0)