All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m3s
Previous migration (20260426130000) may be recorded as failed in _prisma_migrations after a db push conflict. This new migration with a different timestamp will be seen as pending and applied with idempotent SQL that handles both cases. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
17 lines
508 B
SQL
17 lines
508 B
SQL
-- Ensure agent schedule columns exist (idempotent)
|
|
-- Handles both: fresh DB (columns missing) and DB where columns were added by 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 $$;
|