snapshot.json is not of the latest version

Hi! I just updated drizzle ORM in my project to:
"drizzle-orm": "0.33.0", // from "0.30.9"
"drizzle-kit": "0.24.0", // from "0.20.17"
"drizzle-orm": "0.33.0", // from "0.30.9"
"drizzle-kit": "0.24.0", // from "0.20.17"
I also migrated to new config after the update:
export default defineConfig({
schema: "./src/core/database/schema.ts",
out: "./database/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL ?? "",
},
verbose: true,
strict: true,
});
export default defineConfig({
schema: "./src/core/database/schema.ts",
out: "./database/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL ?? "",
},
verbose: true,
strict: true,
});
However when I try to generate migration after modifying the schema, I get an error:
> pnpm drizzle-kit generate
No config path provided, using default 'drizzle.config.ts'
Reading config file 'F:\Projects\app\backend\drizzle.config.ts'
database\migrations\meta\0000_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0001_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0002_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0003_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0004_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0005_snapshot.json/snapshot.json is not of the latest version
Run drizzle-kit up
> pnpm drizzle-kit generate
No config path provided, using default 'drizzle.config.ts'
Reading config file 'F:\Projects\app\backend\drizzle.config.ts'
database\migrations\meta\0000_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0001_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0002_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0003_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0004_snapshot.json/snapshot.json is not of the latest version
database\migrations\meta\0005_snapshot.json/snapshot.json is not of the latest version
Run drizzle-kit up
Is there something I'm missing here? When I roll back the packages generate:pg work fine.
1 Reply
Kuba
KubaOP2mo ago
Turns out, that I needed to run drizzle-kit up first. This migrates snapshots to v6, and makes them compatible with later versions of drizzle-kit
Want results from more Discord servers?
Add your server