All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m1s
Use DO blocks with EXCEPTION WHEN duplicate_column to safely handle columns that may already exist from a previous db push. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
461 B
SQL
16 lines
461 B
SQL
-- AlterTable: Agent (idempotent — safe if columns already exist from a previous db push)
|
|
DO $$ BEGIN
|
|
ALTER TABLE "Agent" ADD COLUMN "scheduledTime" TEXT DEFAULT '08:00';
|
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
|
END $$;
|
|
|
|
DO $$ BEGIN
|
|
ALTER TABLE "Agent" ADD COLUMN "scheduledDay" INTEGER;
|
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
|
END $$;
|
|
|
|
DO $$ BEGIN
|
|
ALTER TABLE "Agent" ADD COLUMN "timezone" TEXT;
|
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
|
END $$;
|