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-02-01 03:08:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-01 03:08:41 +0300
commit72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 (patch)
tree2e81b28a062212375bf17d1da0ff836d6b021469 /db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb
parent9db503ef9888c984b287af44d009d884e835ce04 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb')
-rw-r--r--db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb b/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb
new file mode 100644
index 00000000000..2f13567c540
--- /dev/null
+++ b/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class UpdateIndexesOfPagesDomainsAddUsageDomainWildcardRemoveDomain < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :pages_domains, :usage
+ add_concurrent_index :pages_domains, [:domain, :wildcard], unique: true
+ remove_concurrent_index :pages_domains, :domain
+ end
+
+ def down
+ remove_concurrent_index :pages_domains, :usage
+ remove_concurrent_index :pages_domains, [:domain, :wildcard]
+ add_concurrent_index :pages_domains, :domain, unique: true
+ end
+end