summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 18:42:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 18:42:02 +0000
commit5a1541a44f745cf9ae4121d6919a1530a7212afe (patch)
tree3841ea24d9eaa1e5521f168348af3fd409aab962 /db
parentf1bc6c9f752e5dcf11f5798c70498e9ae4a8e3ec (diff)
downloadgitlab-ce-5a1541a44f745cf9ae4121d6919a1530a7212afe.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb18
-rw-r--r--db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb15
-rw-r--r--db/schema_migrations/202011282100001
3 files changed, 23 insertions, 11 deletions
diff --git a/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb b/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb
new file mode 100644
index 00000000000..52d24de60d5
--- /dev/null
+++ b/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddServiceDeskReplyToIsNotNullIndexOnIssuesFix < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index(:issues, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL')
+ end
+
+ def down
+ remove_concurrent_index_by_name(:issues, INDEX_NAME)
+ end
+end
diff --git a/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb b/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb
index fb5429af458..7643fc107aa 100644
--- a/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb
+++ b/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb
@@ -1,18 +1,11 @@
# frozen_string_literal: true
class AddServiceDeskReplyToIsNotNullIndexOnIssues < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
DOWNTIME = false
- INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index(:issues, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL')
- end
- def down
- remove_concurrent_index_by_name(:issues, INDEX_NAME)
+ def change
+ # no-op, the migration's version number was lowered to be executed earlier than db/post_migrate/20201128210234_schedule_populate_issue_email_participants.rb
+ #
+ # The new migration is located here: db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb
end
end
diff --git a/db/schema_migrations/20201128210000 b/db/schema_migrations/20201128210000
new file mode 100644
index 00000000000..9ce8d37ff37
--- /dev/null
+++ b/db/schema_migrations/20201128210000
@@ -0,0 +1 @@
+2f7415e3e3e66f326f2f65c38406c2103d5075493c86a836497c3541655f4e86 \ No newline at end of file