Wrong migration SQL generating
I'm getting wrong migration SQL when running
drizzle-kit generate
. The main error you can find in the questions table, it's missing so many fields.8 Replies
schema.ts file
generated sql file
drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
schema: "./src/db/schema.ts",
out: "./src/db/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
verbose: true,
strict: true,
});
You define 2 times the
questions
table.
Your topics
table (the const) is also defined to be named questions
@Raphaël M (@rphlmr) ⚡ thanks
I missed that. Silly copilot 🥺
I should have checked it properly before asking