blob: 6e861fc258a2616e077d0464010634e002084f6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# frozen_string_literal: true
class RemoveWebauthnRegistrationsU2fRegistrationIdColumn < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
INDEX_NAME = 'index_webauthn_registrations_on_u2f_registration_id'
def up
remove_column :webauthn_registrations, :u2f_registration_id
end
def down
add_column :webauthn_registrations, :u2f_registration_id, :integer
add_concurrent_index(
:webauthn_registrations,
:u2f_registration_id,
name: INDEX_NAME,
where: 'u2f_registration_id IS NOT NULL')
end
end
|