SQL many statements?

Any ideas on how to debug this?
Task migrations deno run -A src/lib/db/migrations.ts
error: Uncaught (in promise) LibsqlError: SQL_MANY_STATEMENTS: SQL string contains more than one statement
at mapHranaError (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/@[email protected]/node_modules/@libsql/client/lib-esm/hrana.js:257:16)
at HttpTransaction.batch (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/@[email protected]/node_modules/@libsql/client/lib-esm/hrana.js:105:19)
at Object.runMicrotasks (ext:core/01_core.js:642:26)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:39:10)
at runNextTicks (ext:deno_node/_next_tick.ts:48:3)
at eventLoopTick (ext:core/01_core.js:175:21)
at async file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/session-afae3551.mjs:926:25
at async LibSQLSession.transaction (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/libsql/index.mjs:86:28)
at async SQLiteAsyncDialect.migrate (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/session-afae3551.mjs:922:9)
at async file:///Users/fharris/Projects/jobasaurus-crawler/src/lib/db/migrations.ts:4:1
Caused by: ResponseError: SQL string contains more than one statement
Task migrations deno run -A src/lib/db/migrations.ts
error: Uncaught (in promise) LibsqlError: SQL_MANY_STATEMENTS: SQL string contains more than one statement
at mapHranaError (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/@[email protected]/node_modules/@libsql/client/lib-esm/hrana.js:257:16)
at HttpTransaction.batch (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/@[email protected]/node_modules/@libsql/client/lib-esm/hrana.js:105:19)
at Object.runMicrotasks (ext:core/01_core.js:642:26)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:39:10)
at runNextTicks (ext:deno_node/_next_tick.ts:48:3)
at eventLoopTick (ext:core/01_core.js:175:21)
at async file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/session-afae3551.mjs:926:25
at async LibSQLSession.transaction (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/libsql/index.mjs:86:28)
at async SQLiteAsyncDialect.migrate (file:///Users/fharris/Projects/jobasaurus-crawler/node_modules/.deno/[email protected]/node_modules/drizzle-orm/session-afae3551.mjs:922:9)
at async file:///Users/fharris/Projects/jobasaurus-crawler/src/lib/db/migrations.ts:4:1
Caused by: ResponseError: SQL string contains more than one statement
The generate SQL its trying to run is
ALTER TABLE `job` ADD `min_salary` integer;--> statement-breakpoint
ALTER TABLE `job` ADD `max_salary` integer;--> statement-breakpoint
ALTER TABLE `job` DROP COLUMN `salary`;
ALTER TABLE `job` ADD `min_salary` integer;--> statement-breakpoint
ALTER TABLE `job` ADD `max_salary` integer;--> statement-breakpoint
ALTER TABLE `job` DROP COLUMN `salary`;
Using sqlite/turso and deno. Thanks!
6 Replies
hirefrank
hirefrankOP7mo ago
I've upgraded to the last versions of libsql, drizzle-kit and drizzle-orm but keep getting the same error any ideas folks?
ShaneCodes
ShaneCodes7mo ago
Running into the same issue.
Andrii Sherman
Andrii Sherman7mo ago
Looking into it
Angelelz
Angelelz7mo ago
Isn't that the purpose of the breakpoints?
Andrii Sherman
Andrii Sherman7mo ago
yes, strange it didn't work --> statement-breakpoint should do the trick
Want results from more Discord servers?
Add your server