CLAYTONGP
CLAYTONGP
DTDrizzle Team
Created by CLAYTONGP on 4/25/2024 in #help
'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?
1 replies