Error migrating after updating to orm 0.23.3
After updating to the package released an hour ago, I am getting an error on migrating:
error - RangeError: The supplied SQL string contains more than one statement
at Database.prepare (.../node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
at BetterSQLiteSession.prepareQuery (.../node_modules/drizzle-orm/better-sqlite3/session.js:19:34)
at BetterSQLiteSession.prepareOneTimeQuery (.../node_modules/drizzle-orm/sqlite-core/session.js:14:21)
at BetterSQLiteSession.run (.../node_modules/drizzle-orm/sqlite-core/session.js:17:21)
at SQLiteSyncDialect.migrate (.../node_modules/drizzle-orm/sqlite-core/dialect.js:255:33)
at migrate (.../node_modules/drizzle-orm/better-sqlite3/migrator.js:7:16)
Migration code:
3 Replies
try setting
breakpoints: true
in your Drizzle config and re-generate the migrationThank you that solves the problem. Should I expect to use that indefinitely going forward?
yes, SQLite and MySQL drivers do not support multiple DDL statements in one transaction, so we have to split them and run one by one