faslin_kosta
faslin_kosta
DTDrizzle Team
Created by faslin_kosta on 4/3/2024 in #help
::character varying generating the end of varchar().default() in migrations
Hello, guys! Maybe here is the right place for this, since I need help now. Just a quick question for the drizzle-kit migrations: I have a schema that looks like this:
createButtonText: varchar('create_button_text', { length: 60 }).default(
'Send'
),
updateButtonText: varchar('update_button_text', { length: 60 }).default(
'Resend'
),
createButtonText: varchar('create_button_text', { length: 60 }).default(
'Send'
),
updateButtonText: varchar('update_button_text', { length: 60 }).default(
'Resend'
),
but the migration generates this:
createButtonText: varchar("create_button_text", { length: 60 }).default('Send'::character varying),
updateButtonText: varchar("update_button_text", { length: 60 }).default('Resend'::character varying),
createButtonText: varchar("create_button_text", { length: 60 }).default('Send'::character varying),
updateButtonText: varchar("update_button_text", { length: 60 }).default('Resend'::character varying),
And gives a type error. Is there something I'm doing wrong? And I really need these strings to be 60 chars max, that is why I am using varchar.
1 replies