I'm not really sure why I keep getting an error whenever I try to run drizzle:push": "sst shell drizzle-kit push". I've been able to reproduce this in both new and existing projects since March. I've always make sure my Drizzle deps are up to date.
Reading config file '/home/moncy/projects/kyros-labs/artemis/packages/core/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣟] Pulling schema from database...
/home/moncy/projects/kyros-labs/artemis/node_modules/drizzle-kit/bin.cjs:19716
checkValue = checkValue.replace(/^CHECK\s*\(\(/, "").replace(/\)\)\s*$/, "");
^
TypeError: Cannot read properties of undefined (reading 'replace')
at /home/moncy/projects/kyros-labs/artemis/node_modules/drizzle-kit/bin.cjs:19716:39
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.18.0
Expected behavior
The command should work as expected in a project using Drizzle ORM with either Supabase or NeonDB as the DB service.
Environment & setup
NeonDB
import { defineConfig } from 'drizzle-kit'
import { Resource } from 'sst'
export default defineConfig({
dialect: 'postgresql',
schema: './src/schema/*',
out: './migrations',
dbCredentials: {
url: Resource.DatabaseUrl.value,
database: 'postgres',
port: 5432,
},
verbose: true,
strict: true,
schemaFilter: ['public'],
})
import { neonConfig, Pool as NeonPool } from '@neondatabase/serverless'
import { drizzle as drizzleNeon } from 'drizzle-orm/neon-serverless'
import { Resource } from 'sst'
import ws from 'ws'
import * as schema from './schema'
neonConfig.webSocketConstructor = ws
export const neonDatabaseUrl = Resource.DatabaseUrl.value
export const db = drizzleNeon<typeof schema>(
new NeonPool({ connectionString: neonDatabaseUrl }),
{
schema,
// logger: Resource.App.stage !== 'production',
},
)
export type DB = typeof db
What version of
drizzle-orm
are you using?0.35.2
What version of
drizzle-kit
are you using?0.26.2
Describe the Bug
I'm not really sure why I keep getting an error whenever I try to run
drizzle:push": "sst shell drizzle-kit push"
. I've been able to reproduce this in both new and existing projects since March. I've always make sure my Drizzle deps are up to date.Expected behavior
The command should work as expected in a project using Drizzle ORM with either Supabase or NeonDB as the DB service.
Environment & setup
NeonDB
Supabase
Linux (Fedora)