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
Pradip Chaudhary
Pradip ChaudharyOP5mo ago
schema.ts file
Pradip Chaudhary
Pradip ChaudharyOP5mo ago
generated sql file
Pradip Chaudhary
Pradip ChaudharyOP5mo ago
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, });
rphlmr ⚡
rphlmr ⚡5mo ago
You define 2 times the questions table. Your topics table (the const) is also defined to be named questions
rphlmr ⚡
rphlmr ⚡5mo ago
No description
Pradip Chaudhary
Pradip ChaudharyOP5mo ago
@Raphaël M (@rphlmr) ⚡ thanks I missed that. Silly copilot 🥺 I should have checked it properly before asking
Want results from more Discord servers?
Add your server