diff --git a/scripts/sql/256_custom_deployment_schema.down.sql b/scripts/sql/256_custom_deployment_schema.down.sql new file mode 100644 index 0000000000..07c9a8f12b --- /dev/null +++ b/scripts/sql/256_custom_deployment_schema.down.sql @@ -0,0 +1,4 @@ + +DROP TABLE IF EXISTS public.chart_ref_schema; + +DELETE FROM devtron_resource_searchable_key WHERE name = 'CHART_REF_ID'; \ No newline at end of file diff --git a/scripts/sql/256_custom_deployment_schema.up.sql b/scripts/sql/256_custom_deployment_schema.up.sql new file mode 100644 index 0000000000..0638a97f7c --- /dev/null +++ b/scripts/sql/256_custom_deployment_schema.up.sql @@ -0,0 +1,19 @@ + + +CREATE TABLE IF NOT EXISTS public.chart_ref_schema +( + id SERIAL PRIMARY KEY, + "name" varchar(250) NOT NULL, + "type" int NOT NULL, + "schema" text, + "created_on" timestamptz, + "created_by" int4, + "updated_on" timestamptz, + "updated_by" int4, + "active" bool + ); + +ALTER TABLE public.chart_ref_schema OWNER TO postgres; + +INSERT INTO devtron_resource_searchable_key(name, is_removed, created_on, created_by, updated_on, updated_by) +VALUES ('CHART_REF_ID', false, now(), 1, now(), 1); \ No newline at end of file