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>2022-06-28 18:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-28 18:09:17 +0300
commit5bb54b8711a6fd0993ab014f6749cbb74c7b071b (patch)
tree199523e0396170c053798dd470aac0c618ee9b14 /db
parenteea806d673f060c2660c84ef8fe7f964824460de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/docs/post_migration_test_table.yml8
-rw-r--r--db/post_migrate/20220627223041_add_post_migrate_test_table.rb13
-rw-r--r--db/schema_migrations/202206272230411
-rw-r--r--db/structure.sql19
4 files changed, 41 insertions, 0 deletions
diff --git a/db/docs/post_migration_test_table.yml b/db/docs/post_migration_test_table.yml
new file mode 100644
index 00000000000..60415e15980
--- /dev/null
+++ b/db/docs/post_migration_test_table.yml
@@ -0,0 +1,8 @@
+---
+table_name: post_migration_test_table
+classes: []
+feature_categories:
+- database
+description: Test table to verify the behavior of the post-deploy independent pipeline
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91119
+milestone: '15.2'
diff --git a/db/post_migrate/20220627223041_add_post_migrate_test_table.rb b/db/post_migrate/20220627223041_add_post_migrate_test_table.rb
new file mode 100644
index 00000000000..8d97444f8c1
--- /dev/null
+++ b/db/post_migrate/20220627223041_add_post_migrate_test_table.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddPostMigrateTestTable < Gitlab::Database::Migration[2.0]
+ # Fake table to be used for testing the post-deploy pipeline,
+ # details can be seen on https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/2352.
+ #
+ # It should be deleted after the testing is completed.
+ def change
+ create_table :post_migration_test_table do |t|
+ t.integer :status, null: false
+ end
+ end
+end
diff --git a/db/schema_migrations/20220627223041 b/db/schema_migrations/20220627223041
new file mode 100644
index 00000000000..3292e76e1de
--- /dev/null
+++ b/db/schema_migrations/20220627223041
@@ -0,0 +1 @@
+225606ccdf0979aaf70ff8b9a44269e69b1598718e3d7c1944ed41c07b5e33f6 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 34bfb8380f6..f35efe93d28 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -18837,6 +18837,20 @@ CREATE SEQUENCE pool_repositories_id_seq
ALTER SEQUENCE pool_repositories_id_seq OWNED BY pool_repositories.id;
+CREATE TABLE post_migration_test_table (
+ id bigint NOT NULL,
+ status integer NOT NULL
+);
+
+CREATE SEQUENCE post_migration_test_table_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE post_migration_test_table_id_seq OWNED BY post_migration_test_table.id;
+
CREATE TABLE postgres_async_indexes (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -23235,6 +23249,8 @@ ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regcl
ALTER TABLE ONLY pool_repositories ALTER COLUMN id SET DEFAULT nextval('pool_repositories_id_seq'::regclass);
+ALTER TABLE ONLY post_migration_test_table ALTER COLUMN id SET DEFAULT nextval('post_migration_test_table_id_seq'::regclass);
+
ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('postgres_async_indexes_id_seq'::regclass);
ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass);
@@ -25329,6 +25345,9 @@ ALTER TABLE ONLY plans
ALTER TABLE ONLY pool_repositories
ADD CONSTRAINT pool_repositories_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY post_migration_test_table
+ ADD CONSTRAINT post_migration_test_table_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY postgres_async_indexes
ADD CONSTRAINT postgres_async_indexes_pkey PRIMARY KEY (id);