Skip to content

Commit d010095

Browse files
feat: ignoring Bulk rubocop rule for migration
1 parent d5479d7 commit d010095

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
class ChangeWebauthnIdToUuidInUsers < ActiveRecord::Migration[8.0]
2-
def up
3-
change_table :users, bulk: true do |t|
4-
t.remove :webauthn_id
5-
t.column :webauthn_id, :uuid, null: false, default: -> { "gen_random_uuid()" }
6-
end
7-
end
8-
9-
def down
10-
change_table :users, bulk: true do |t|
11-
t.remove :webauthn_id
12-
t.column :webauthn_id, :string
13-
end
2+
def change
3+
# rubocop:disable Rails/BulkChangeTable
4+
remove_column :users, :webauthn_id, :string
5+
add_column :users, :webauthn_id, :uuid, null: false, default: -> { "gen_random_uuid()" }
6+
# rubocop:enable Rails/BulkChangeTable
147
end
158
end

0 commit comments

Comments
 (0)