Closed funkypierre closed 1 year ago
Hi @funkypierre, if you have any blind indexes on the model, you'll need to specify the key for those as well. There's not a key_table
option yet, but you can use:
class User < ApplicationRecord
blind_index :email, key: BlindIndex.index_key(table: "old_table", bidx_attribute: "email_bidx")
end
It worked instantly ! You saved my week ! I love you ! Thank you for the turbo quick response
Great, glad that fixed it! Also, added a key_table
option in Blind Index 2.3.2 to make it possible to do:
class User < ApplicationRecord
blind_index :email, key_table: "old_table"
end
Hi there !
I recently changed a User table name, but I can't sign_in with any account now, just receiving the error "Invalid Credentials" under a 401 Unauthorized.
My steps :
rename_table :old_name, :new_name
has_encrypted :email, previous_versions: [{master_key: 'AAA', key_table: "old_name"}]
devise_for :aaa, class_name: "new_name"
I can access the records in console so I thought the migration went fine. Did I miss any step ?
Cheers :)