How to handle adding new columns to schema?
I have a schema, but I've decided I need to add a new column.
I change the
I can solve this by dropping the table and then re-running the push, but I'm wondering if there is a better way to go about it,
I change the
schema.tsschema.ts file, push, and get the errorLibsqlError: SQLITE_UNKNOWN: SQLite error: table work_experience has 7 columns but 6 values were supplied
at mapHranaError (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:48352:12)
at HranaClient.execute (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:48392:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async TursoSqlite.run (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:42848:9)
at async Command.<anonymous> (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:53386:9) {
code: 'SQLITE_UNKNOWN',
[cause]: [ResponseError: SQLite error: table work_experience has 7 columns but 6 values were supplied] {
code: 'SQLITE_UNKNOWN',
proto: {
message: 'SQLite error: table work_experience has 7 columns but 6 values were supplied',
code: 'SQLITE_UNKNOWN'
}
}
}LibsqlError: SQLITE_UNKNOWN: SQLite error: table work_experience has 7 columns but 6 values were supplied
at mapHranaError (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:48352:12)
at HranaClient.execute (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:48392:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async TursoSqlite.run (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:42848:9)
at async Command.<anonymous> (/Users/steves/repos/side-projects/resume-builder-2/node_modules/drizzle-kit/index.cjs:53386:9) {
code: 'SQLITE_UNKNOWN',
[cause]: [ResponseError: SQLite error: table work_experience has 7 columns but 6 values were supplied] {
code: 'SQLITE_UNKNOWN',
proto: {
message: 'SQLite error: table work_experience has 7 columns but 6 values were supplied',
code: 'SQLITE_UNKNOWN'
}
}
}I can solve this by dropping the table and then re-running the push, but I'm wondering if there is a better way to go about it,