Insert/update statements not executed during migrations

Hi. Does Drizzle support DML statements when running migrations? My use case is to add a new column, populate it and then make it not null.
ALTER TABLE "conversations" ADD COLUMN "channel_id" text;
--> statement-breakpoint
UPDATE "conversations" SET channel_id = 'some value';
--> statement-breakpoint
ALTER TABLE "conversations" ALTER COLUMN "channel_id" SET NOT NULL;
ALTER TABLE "conversations" ADD COLUMN "channel_id" text;
--> statement-breakpoint
UPDATE "conversations" SET channel_id = 'some value';
--> statement-breakpoint
ALTER TABLE "conversations" ALTER COLUMN "channel_id" SET NOT NULL;
PostgresError: column "channel_id" of relation "conversations" contains null values
PostgresError: column "channel_id" of relation "conversations" contains null values
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server