Fighting with migrations

Hi, I have a SQL database that I should keep. I messed up my migrations. i tried to restart from a blank slate. - Removed the migration (in database, in files (snapshot, migration files and journal file)) - I did a npx drizzle-kit pull - I get a commented migration file, I deleted schema and everything(already have those) - I tried to create a new field, then run npx drizzle-kit migrate I got this "error"
1 Reply
! Gaetan Puleo
! Gaetan PuleoOP3w ago
⣷] applying migrations...LibsqlError: SQLITE_OK: not an error
at mapSqliteError (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:372:16)
at executeStmt (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:277:15)
at file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:111:24
... 3 lines matching cause stack trace ...
at migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/migrator.ts:46:19) {
code: 'SQLITE_OK',
rawCode: 0,
[cause]: SqliteError: not an error
at convertError (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/libsql/index.js:51:12)
at Statement.run (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/libsql/index.js:301:13)
at executeStmt (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:270:34)
at file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:111:24
at Array.map (<anonymous>)
at Sqlite3Client.migrate (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:107:38)
at LibSQLSession.migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/session.ts:90:42)
at migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/migrator.ts:46:19) {
code: 'SQLITE_OK',
rawCode: 0
}
⣷] applying migrations...LibsqlError: SQLITE_OK: not an error
at mapSqliteError (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:372:16)
at executeStmt (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:277:15)
at file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:111:24
... 3 lines matching cause stack trace ...
at migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/migrator.ts:46:19) {
code: 'SQLITE_OK',
rawCode: 0,
[cause]: SqliteError: not an error
at convertError (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/libsql/index.js:51:12)
at Statement.run (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/libsql/index.js:301:13)
at executeStmt (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:270:34)
at file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:111:24
at Array.map (<anonymous>)
at Sqlite3Client.migrate (file:///home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/@libsql/client/lib-esm/sqlite3.js:107:38)
at LibSQLSession.migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/session.ts:90:42)
at migrate (/home/gaetanpuleo/dev/perso/lead-generation-mvp/node_modules/src/libsql/migrator.ts:46:19) {
code: 'SQLITE_OK',
rawCode: 0
}
What should I do to start again with migration and what is the workflow to cancel a migration (get back in previous state) Rollback is missing in drizzle
Want results from more Discord servers?
Add your server