drizzle-kit migrate error
When I
and then run
drizzle-kit generate
a schema change of
ALTER TABLE `item` ADD `count` integer DEFAULT 0 NOT NULL;
ALTER TABLE `item` ADD `count` integer DEFAULT 0 NOT NULL;
drizzle-kit migrate
how come I get the below error that is about another unrelated credential
table?
[⣷] applying migrations...LibsqlError: SQLITE_ERROR: table `credential` already exists
at mapSqliteError (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:350:16)
at executeStmt (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:255:15)
at .../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:90:24
... 3 lines matching cause stack trace ...
at migrate (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/migrator.ts:50:19) {
code: 'SQLITE_ERROR',
rawCode: 1,
[cause]: SqliteError: table `credential` already exists
at convertError (.../node_modules/.pnpm/[email protected]/node_modules/libsql/index.js:49:12)
at Database.prepare (.../node_modules/.pnpm/[email protected]/node_modules/libsql/index.js:113:13)
at executeStmt (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:226:28)
at .../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:90:24
at Array.map (<anonymous>)
at Sqlite3Client.batch (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:86:38)
at LibSQLSession.batch (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/session.ts:75:42)
at migrate (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/migrator.ts:50:19) {
code: 'SQLITE_ERROR',
rawCode: 1
}
}
ELIFECYCLE Command failed with exit code 1.
[⣷] applying migrations...LibsqlError: SQLITE_ERROR: table `credential` already exists
at mapSqliteError (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:350:16)
at executeStmt (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:255:15)
at .../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:90:24
... 3 lines matching cause stack trace ...
at migrate (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/migrator.ts:50:19) {
code: 'SQLITE_ERROR',
rawCode: 1,
[cause]: SqliteError: table `credential` already exists
at convertError (.../node_modules/.pnpm/[email protected]/node_modules/libsql/index.js:49:12)
at Database.prepare (.../node_modules/.pnpm/[email protected]/node_modules/libsql/index.js:113:13)
at executeStmt (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:226:28)
at .../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:90:24
at Array.map (<anonymous>)
at Sqlite3Client.batch (.../node_modules/.pnpm/@[email protected]/node_modules/@libsql/client/lib-esm/sqlite3.js:86:38)
at LibSQLSession.batch (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/session.ts:75:42)
at migrate (.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/src/libsql/migrator.ts:50:19) {
code: 'SQLITE_ERROR',
rawCode: 1
}
}
ELIFECYCLE Command failed with exit code 1.
0 Replies