Skip to content

Commit 3ee5cef

Browse files
Merge pull request #6951 from devtron-labs/fix-save-plugin
chore: added sql migration
2 parents 836770b + 958d107 commit 3ee5cef

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BEGIN;
2+
3+
ALTER TABLE "public"."plugin_step_variable"
4+
DROP CONSTRAINT IF EXISTS plugin_step_variable_value_constraint_id_fkey;
5+
6+
ALTER TABLE "public"."plugin_step_variable"
7+
DROP COLUMN IF EXISTS "is_runtime_arg",
8+
DROP COLUMN IF EXISTS "value_constraint_id";
9+
10+
COMMIT;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BEGIN;
2+
3+
-- Add is_runtime_arg and value_constraint_id to plugin_step_variable
4+
-- These were intended in migration 30802500 (comment says so) but were missed
5+
ALTER TABLE "public"."plugin_step_variable"
6+
ADD COLUMN IF NOT EXISTS "is_runtime_arg" boolean NOT NULL DEFAULT FALSE,
7+
ADD COLUMN IF NOT EXISTS "value_constraint_id" int;
8+
9+
-- Add FK to value_constraint table
10+
ALTER TABLE "public"."plugin_step_variable"
11+
ADD CONSTRAINT "plugin_step_variable_value_constraint_id_fkey"
12+
FOREIGN KEY ("value_constraint_id") REFERENCES "public"."value_constraint" ("id");
13+
14+
COMMIT;

0 commit comments

Comments
 (0)