push:mysql autoincrement error

When running push:mysql, drizzle-kit throws this error:
Warning You have removed the primary key from a reservation table without removing the auto-increment property from this table. As the database error states: 'there can be only one auto column, and it must be defined as a key. Make sure to remove autoincrement from reservation table
error Command failed with exit code 1.
Warning You have removed the primary key from a reservation table without removing the auto-increment property from this table. As the database error states: 'there can be only one auto column, and it must be defined as a key. Make sure to remove autoincrement from reservation table
error Command failed with exit code 1.
On first push on an empty db this doesn't happen but on a subsequent push it does. The reservation table only has one auto-increment (serial id), so I'm not sure why this happens. Running drizzle-kit introspect:mysql returns a schema which looks basically identical to the input schema, I'll attach these two files where schema.js is my schema and schema.ts is the result of introspect.
drizzle-kit: v0.20.14
drizzle-orm: v0.30.4
drizzle-kit: v0.20.14
drizzle-orm: v0.30.4
Config:
export default {
schema: "./db/schema.js",
out: "./drizzle",
driver: "mysql2",
dbCredentials: {
host: --,
user: --,
database: --,
password: --,
},
};
export default {
schema: "./db/schema.js",
out: "./drizzle",
driver: "mysql2",
dbCredentials: {
host: --,
user: --,
database: --,
password: --,
},
};
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server