diff --git a/scripts/sql/36004600_plugin_variable_runtime_support.down.sql b/scripts/sql/36004600_plugin_variable_runtime_support.down.sql new file mode 100644 index 0000000000..9f45da6665 --- /dev/null +++ b/scripts/sql/36004600_plugin_variable_runtime_support.down.sql @@ -0,0 +1,10 @@ +BEGIN; + +ALTER TABLE "public"."plugin_step_variable" + DROP CONSTRAINT IF EXISTS plugin_step_variable_value_constraint_id_fkey; + +ALTER TABLE "public"."plugin_step_variable" + DROP COLUMN IF EXISTS "is_runtime_arg", + DROP COLUMN IF EXISTS "value_constraint_id"; + +COMMIT; \ No newline at end of file diff --git a/scripts/sql/36004600_plugin_variable_runtime_support.up.sql b/scripts/sql/36004600_plugin_variable_runtime_support.up.sql new file mode 100644 index 0000000000..eea342e61a --- /dev/null +++ b/scripts/sql/36004600_plugin_variable_runtime_support.up.sql @@ -0,0 +1,14 @@ +BEGIN; + +-- Add is_runtime_arg and value_constraint_id to plugin_step_variable +-- These were intended in migration 30802500 (comment says so) but were missed +ALTER TABLE "public"."plugin_step_variable" + ADD COLUMN IF NOT EXISTS "is_runtime_arg" boolean NOT NULL DEFAULT FALSE, + ADD COLUMN IF NOT EXISTS "value_constraint_id" int; + +-- Add FK to value_constraint table +ALTER TABLE "public"."plugin_step_variable" + ADD CONSTRAINT "plugin_step_variable_value_constraint_id_fkey" + FOREIGN KEY ("value_constraint_id") REFERENCES "public"."value_constraint" ("id"); + +COMMIT; \ No newline at end of file