-
-
Notifications
You must be signed in to change notification settings - Fork 947
Closed as duplicate of#3559
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm
are you using?
0.39.3
What version of drizzle-kit
are you using?
0.30.4
Other packages
No response
Describe the Bug
I was following the Supabase guide while using a local Supabase setup. My drizzle.config.ts
file is as follows:
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
out: './src/lib/server/drizzle',
schema: './src/lib/server/drizzle/schema.ts',
dialect: 'postgresql',
schemaFilter: ['public', 'auth'],
dbCredentials: {
url: process.env.PRIVATE_SUPABASE_DB_URL!,
},
});
Upon running drizzle-kit pull
, the generated schema contains invalid JavaScript syntax for default()
values. Specifically, default()
is generated with an unclosed single quote:
phoneChange: text("phone_change").default('),
phoneChangeToken: varchar("phone_change_token", { length: 255 }).default('),
This causes a syntax error in the application.
Steps to Reproduce
- Set up a local Supabase instance.
- Use the provided drizzle.config.ts configuration.
- Run drizzle-kit generate.
- Observe that the generated schema has default() values with an unclosed single quote.
Expected Behavior
Drizzle should generate valid JavaScript syntax, ensuring that default()
values are correctly formatted (e.g., default('')
instead of default(')
).
Additional Context
- Database Engine: PostgreSQL (Supabase)
- Monorepo: No
- Runtime: Node.js 20.11.2
- TypeScript Version: 5.7.3
rleonid, p2pdops, karur4n, ziyafenn, rodebert and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working