From 5bb54b8711a6fd0993ab014f6749cbb74c7b071b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 28 Jun 2022 15:09:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- db/docs/post_migration_test_table.yml | 8 ++++++++ .../20220627223041_add_post_migrate_test_table.rb | 13 +++++++++++++ db/schema_migrations/20220627223041 | 1 + db/structure.sql | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 db/docs/post_migration_test_table.yml create mode 100644 db/post_migrate/20220627223041_add_post_migrate_test_table.rb create mode 100644 db/schema_migrations/20220627223041 (limited to 'db') 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); -- cgit v1.2.3