'drizzle-kit introspect:pg' generates invalid Typerscript syntax ("::character varying", "NULL")

When I use , it generates my schema.ts file, but includes syntax that is invalid, such as:
export const blogPosts = pgTable("blog_posts", {
id: serial("id").primaryKey().notNull(),
status: varchar("status", { length: 255 }).default('draft'::character varying).notNull(),
...
export const blogPosts = pgTable("blog_posts", {
id: serial("id").primaryKey().notNull(),
status: varchar("status", { length: 255 }).default('draft'::character varying).notNull(),
...
Note the ::character varying. This file does not work when using push:pg due to these characters. I also noticed .default(NULL) which is also not valid. Can I prevent this?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server