wesp
wesp
DTDrizzle Team
Created by wesp on 10/24/2024 in #help
Is it possible to generate a default value concatenating with NEXTVAL?
For example, I want to do this
number: varchar({ length: 15 }).default(`'S' || NEXTVAL('number_sequence')`),
number: varchar({ length: 15 }).default(`'S' || NEXTVAL('number_sequence')`),
But the generated SQL is incorrect with extra quotes wrapping the default:
ALTER TABLE "sessions" ADD COLUMN "number" varchar(15) DEFAULT ''S' || NEXTVAL('session_number_sequence')';
ALTER TABLE "sessions" ADD COLUMN "number" varchar(15) DEFAULT ''S' || NEXTVAL('session_number_sequence')';
3 replies
DTDrizzle Team
Created by wesp on 9/16/2024 in #help
Logging migrations
Is there a way to log the database migrations as they are being applied?
3 replies