TypeError: Cannot read properties of undefined (reading 'replace')

I'm switching from Option 3 to Option 2 from this document https://orm.drizzle.team/docs/migrations I used drizzle-kit push to push my new schema changes to Supabase database but got this error
.../node_modules/drizzle-kit/bin.cjs:20104
checkValue = checkValue.replace(/^CHECK\s*\(\(/, "").replace(/\)\)\s*$/, "");
^

TypeError: Cannot read properties of undefined (reading 'replace')
Node.js v20.13.1
.../node_modules/drizzle-kit/bin.cjs:20104
checkValue = checkValue.replace(/^CHECK\s*\(\(/, "").replace(/\)\)\s*$/, "");
^

TypeError: Cannot read properties of undefined (reading 'replace')
Node.js v20.13.1
What exactly is going wrong?
Drizzle ORM - Migrations
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
2 Replies
Minh Techie
Minh TechieOP2w ago
Here's my schema
Minh Techie
Minh TechieOP2w ago
and here's drizzle.config.ts. The database url is correct
import { defineConfig } from "drizzle-kit";

export default defineConfig({
dialect: "postgresql",
schemaFilter: ["public"],
introspect: {
casing: "preserve",
},
schema: "./src/db/schema",
out: "./supabase/migrations",
dbCredentials: {
url: process.env.DATABASE_URL ?? "",
},
});
import { defineConfig } from "drizzle-kit";

export default defineConfig({
dialect: "postgresql",
schemaFilter: ["public"],
introspect: {
casing: "preserve",
},
schema: "./src/db/schema",
out: "./supabase/migrations",
dbCredentials: {
url: process.env.DATABASE_URL ?? "",
},
});
Want results from more Discord servers?
Add your server