fix: add new migration to ensure agent schedule columns exist
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m3s
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>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- 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 $$;
|
||||
Reference in New Issue
Block a user