blob: 73db5e71b94c4415b58154756abc23dac7689093 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
class AddNeedsSslRenewalUserProvidedPagesDomainsIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_pages_domains_need_auto_ssl_renewal_user_provided'
INDEX_SCOPE = "auto_ssl_enabled = true AND auto_ssl_failed = false AND certificate_source = 0"
disable_ddl_transaction!
def up
add_concurrent_index(:pages_domains, :id, where: INDEX_SCOPE, name: INDEX_NAME)
end
def down
remove_concurrent_index(:pages_domains, :id, where: INDEX_SCOPE, name: INDEX_NAME)
end
end
|