diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 18:15:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 18:15:54 +0300 |
commit | a4bc9e75d8078f37e9c196333a3a1484e97d6a71 (patch) | |
tree | afa40a4da70aaa3715a9e5f104ec9a36f15aede9 /db/migrate | |
parent | a4db97517ad095914c0652a07486ac607d99dab4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20231214095546_add_issue_id_to_epics.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20231214095546_add_issue_id_to_epics.rb b/db/migrate/20231214095546_add_issue_id_to_epics.rb new file mode 100644 index 00000000000..0db34041726 --- /dev/null +++ b/db/migrate/20231214095546_add_issue_id_to_epics.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddIssueIdToEpics < Gitlab::Database::Migration[2.2] + INDEX_NAME = 'index_unique_epics_on_issue_id' + + disable_ddl_transaction! + milestone '16.7' + + def up + add_column :epics, :issue_id, :int, if_not_exists: true + add_concurrent_index :epics, :issue_id, unique: true, name: INDEX_NAME + add_concurrent_foreign_key(:epics, :issues, column: :issue_id, validate: true) + end + + def down + remove_column :epics, :issue_id, if_exists: true + end +end |