bastodon/db/post_migrate/20220118183010_remove_index_users_on_remember_token.rb
Claire 8a07ecd377
Remove leftover database columns from Devise::Models::Rememberable (#17191)
* Remove leftover database columns from Devise::Models::Rememberable

* Update fix-duplication maintenance script

* Improve errors/warnings in the fix-duplicates maintenance script
2022-01-23 15:46:30 +01:00

13 líneas
343 B
Ruby

# frozen_string_literal: true
class RemoveIndexUsersOnRememberToken < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def up
remove_index :users, name: :index_users_on_remember_token
end
def down
add_index :users, :remember_token, algorithm: :concurrently, unique: true, name: :index_users_on_remember_token
end
end