diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 22:06:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 22:06:32 +0300 |
commit | 62e0c3c7d73f028e4c6c8c179d6f04f811a0859f (patch) | |
tree | 69d0c42cb329dd5c64997243608e745dcef77c38 /db/migrate | |
parent | bbcd372db175c8f19b4b72453ff57c9a19887c5f (diff) |
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb b/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb new file mode 100644 index 00000000000..b1d0ac64d42 --- /dev/null +++ b/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddAuthorToCiSubscriptionsProjects < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_ci_subscriptions_projects_author_id' + + def up + unless column_exists?(:ci_subscriptions_projects, :author_id) + add_column :ci_subscriptions_projects, :author_id, :bigint + end + + add_concurrent_index :ci_subscriptions_projects, :author_id, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :ci_subscriptions_projects, INDEX_NAME + remove_column :ci_subscriptions_projects, :author_id + end +end |