diff --git a/ee/scripts/schema/db/init_dbs/postgresql/1.8.2/1.8.2.sql b/ee/scripts/schema/db/init_dbs/postgresql/1.8.2/1.8.2.sql index 9742cd426..a144f3a1d 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/1.8.2/1.8.2.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/1.8.2/1.8.2.sql @@ -60,6 +60,7 @@ BEGIN END; $$ LANGUAGE plpgsql; -ALTER TABLE sessions ADD file_key BYTEA NULL; +ALTER TABLE IF EXISTS sessions + ADD COLUMN IF NOT EXISTS file_key BYTEA DEFAULT NULL; COMMIT; \ No newline at end of file diff --git a/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql b/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql index a3d403b44..866a0e7d5 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql @@ -545,11 +545,12 @@ $$ watchdogs_score bigint NOT NULL DEFAULT 0, issue_score bigint NOT NULL DEFAULT 0, issue_types issue_type[] NOT NULL DEFAULT '{}'::issue_type[], - utm_source text NULL DEFAULT NULL, - utm_medium text NULL DEFAULT NULL, - utm_campaign text NULL DEFAULT NULL, - referrer text NULL DEFAULT NULL, - base_referrer text NULL DEFAULT NULL, + utm_source text DEFAULT NULL, + utm_medium text DEFAULT NULL, + utm_campaign text DEFAULT NULL, + referrer text DEFAULT NULL, + base_referrer text DEFAULT NULL, + file_key bytea DEFAULT NULL, metadata_1 text DEFAULT NULL, metadata_2 text DEFAULT NULL, metadata_3 text DEFAULT NULL,