> npx drizzle-kit push
drizzle-kit: v0.22.6
drizzle-orm: v0.31.2
No config path provided, using default path
Reading config file '.../drizzle.config.ts'
[β] Pulling schema from database...
Warning You are about to execute current statements:
CREATE TABLE `untitled_table_1` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL
);
[β] Changes applied
I connected to the new database and table and manually seeded two rows of data just to make sure (tested both with and without data)
Turso web ui view:
TablePlus view:
drizzle-kit introspect output:
> β― npx drizzle-kit introspect
drizzle-kit: v0.22.6
drizzle-orm: v0.31.2
No config path provided, using default path
Reading config file '.../drizzle.config.ts'
Pulling from ['public'] list of schemas
[β] 0 tables fetched
[β] 0 columns fetched
[β] 0 indexes fetched
[β] 0 foreign keys fetched
[β] Your SQL migration file β drizzle/0000_true_the_call.sql π
[β] You schema file is ready β drizzle/schema.ts π
[β] You relations file is ready β drizzle/relations.ts π
Since the introspection isn't working correctly, subsequent runs of drizzle-kit push will fail because it will attempt to create the table again.
npx drizzle-kit push
drizzle-kit: v0.22.6
drizzle-orm: v0.31.2
No config path provided, using default path
Reading config file '.../drizzle.config.ts'
[β] Pulling schema from database...
Warning You are about to execute current statements:
CREATE TABLE `untitled_table_1` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL
);
LibsqlError: SQL_INPUT_ERROR: SQL input error: table `untitled_table_1` already exists (at offset 13)
at mapHranaError (.../node_modules/@libsql/client/lib-esm/hrana.js:262:16)
at HttpClient.execute (.../node_modules/@libsql/client/lib-esm/http.js:80:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (.../drizzle-kit/bin.cjs:119857:15)
at async sqlitePush (.../node_modules/drizzle-kit/bin.cjs:122665:13)
at async _Command.<anonymous> (.../node_modules/drizzle-kit/bin.cjs:129712:7) {
code: 'SQL_INPUT_ERROR',
rawCode: undefined,
[cause]: [ResponseError: SQL input error: table `untitled_table_1` already exists (at offset 13)] {
code: 'SQL_INPUT_ERROR',
proto: {
message: 'SQL input error: table `untitled_table_1` already exists (at offset 13)',
code: 'SQL_INPUT_ERROR'
}
}
I'm using @libsql/client v0.6.2 if that is relevant.
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.6
Describe the Bug
I created a Turso database
drizzle-test
with a simple tableuntitled_table_1
with two columns.I connected to the new database and table and manually seeded two rows of data just to make sure (tested both with and without data)
Turso web ui view:
TablePlus view:
drizzle-kit introspect
output:Since the introspection isn't working correctly, subsequent runs of
drizzle-kit push
will fail because it will attempt to create the table again.I'm using @libsql/client v0.6.2 if that is relevant.
Expected behavior
No response
Environment & setup
No response