Skip to content

Commit 8503cea

Browse files
committed
Fixed migration so it only adds them if they don’t exist. This allows us to manuall run in cloud first
1 parent b218ff8 commit 8503cea

File tree

1 file changed

+7
-2
lines changed
  • internal-packages/database/prisma/migrations/20250502154714_waitpoint_added_resolvers

1 file changed

+7
-2
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
-- CreateEnum
2-
CREATE TYPE "WaitpointResolver" AS ENUM ('ENGINE', 'TOKEN', 'HTTP_CALLBACK');
2+
DO $$
3+
BEGIN
4+
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'WaitpointResolver') THEN
5+
CREATE TYPE "WaitpointResolver" AS ENUM ('ENGINE', 'TOKEN', 'HTTP_CALLBACK');
6+
END IF;
7+
END$$;
38

49
-- AlterTable
510
ALTER TABLE "Waitpoint"
6-
ADD COLUMN "resolver" "WaitpointResolver" NOT NULL DEFAULT 'ENGINE';
11+
ADD COLUMN IF NOT EXISTS "resolver" "WaitpointResolver" NOT NULL DEFAULT 'ENGINE';

0 commit comments

Comments
 (0)