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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 06:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 06:08:01 +0300
commit796b00a98a82fcbe082c9343fd4efcccc77478dc (patch)
tree257bcb124f57cb91a8dff75e69649e8a2f91c51d /db/migrate
parent93dcf45d441bc884b167f4338380c8c888e9b86f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20200313202430_add_index_chat_name_service_id.rb17
-rw-r--r--db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb16
2 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20200313202430_add_index_chat_name_service_id.rb b/db/migrate/20200313202430_add_index_chat_name_service_id.rb
new file mode 100644
index 00000000000..f4a88973751
--- /dev/null
+++ b/db/migrate/20200313202430_add_index_chat_name_service_id.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexChatNameServiceId < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :chat_names, :service_id
+ end
+
+ def down
+ remove_concurrent_index :chat_names, :service_id
+ end
+end
diff --git a/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb b/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb
new file mode 100644
index 00000000000..c6e340693f8
--- /dev/null
+++ b/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddInvalidForeignKeyFromChatNameToService < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :chat_names, :services, column: :service_id, on_delete: :cascade, validate: false
+ end
+
+ def down
+ remove_foreign_key_if_exists :chat_names, column: :service_id
+ end
+end