Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-03 00:10:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-03 00:10:00 +0300
commite2191b0a18b1fc6b7a70c60cdc31277883095742 (patch)
tree53d0cdac1e145230109d80849b7ffe00645a5dc1 /db
parente84a2fdfc862ac63fe4be9df2f940c22a0c9aba3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210525085158_initialize_conversion_of_deployments_to_bigint.rb16
-rw-r--r--db/migrate/20210525085325_backfill_deployments_for_bigint_conversion.rb16
-rw-r--r--db/schema_migrations/202105250851581
-rw-r--r--db/schema_migrations/202105250853251
-rw-r--r--db/structure.sql14
5 files changed, 47 insertions, 1 deletions
diff --git a/db/migrate/20210525085158_initialize_conversion_of_deployments_to_bigint.rb b/db/migrate/20210525085158_initialize_conversion_of_deployments_to_bigint.rb
new file mode 100644
index 00000000000..70775eb3bb5
--- /dev/null
+++ b/db/migrate/20210525085158_initialize_conversion_of_deployments_to_bigint.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class InitializeConversionOfDeploymentsToBigint < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ TABLE = :deployments
+ COLUMNS = %i(deployable_id)
+
+ def up
+ initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+
+ def down
+ revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/migrate/20210525085325_backfill_deployments_for_bigint_conversion.rb b/db/migrate/20210525085325_backfill_deployments_for_bigint_conversion.rb
new file mode 100644
index 00000000000..6de89cadef8
--- /dev/null
+++ b/db/migrate/20210525085325_backfill_deployments_for_bigint_conversion.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class BackfillDeploymentsForBigintConversion < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ TABLE = :deployments
+ COLUMNS = %i(deployable_id)
+
+ def up
+ backfill_conversion_of_integer_to_bigint TABLE, COLUMNS
+ end
+
+ def down
+ revert_backfill_conversion_of_integer_to_bigint TABLE, COLUMNS
+ end
+end
diff --git a/db/schema_migrations/20210525085158 b/db/schema_migrations/20210525085158
new file mode 100644
index 00000000000..c16bb8edeb9
--- /dev/null
+++ b/db/schema_migrations/20210525085158
@@ -0,0 +1 @@
+a2ce644df46a13d65eb0d01931eeb8e9f43967daadf73eed2f033b6c275ca57d \ No newline at end of file
diff --git a/db/schema_migrations/20210525085325 b/db/schema_migrations/20210525085325
new file mode 100644
index 00000000000..38967a72899
--- /dev/null
+++ b/db/schema_migrations/20210525085325
@@ -0,0 +1 @@
+f085c9a7fc2209cf4d3797cda55c2be76b462eff456e7bf92de4545e0b988053 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 0d215ee6655..d8add15b68d 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -143,6 +143,15 @@ BEGIN
END;
$$;
+CREATE FUNCTION trigger_77f5e1d20482() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+ NEW."deployable_id_convert_to_bigint" := NEW."deployable_id";
+ RETURN NEW;
+END;
+$$;
+
CREATE FUNCTION trigger_8485e97c00e3() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -12288,7 +12297,8 @@ CREATE TABLE deployments (
on_stop character varying,
status smallint NOT NULL,
finished_at timestamp with time zone,
- cluster_id integer
+ cluster_id integer,
+ deployable_id_convert_to_bigint bigint
);
CREATE SEQUENCE deployments_id_seq
@@ -25280,6 +25290,8 @@ CREATE TRIGGER trigger_51ab7cef8934 BEFORE INSERT OR UPDATE ON ci_builds_runner_
CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_69523443cc10();
+CREATE TRIGGER trigger_77f5e1d20482 BEFORE INSERT OR UPDATE ON deployments FOR EACH ROW EXECUTE FUNCTION trigger_77f5e1d20482();
+
CREATE TRIGGER trigger_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_8485e97c00e3();
CREATE TRIGGER trigger_8487d4de3e7b BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_8487d4de3e7b();