Skip to content

Commit

Permalink
Fix migration 20101026184950 when running after rollback
Browse files Browse the repository at this point in the history
When the `up` method of migration `20101026184950` runs after the rollback,
the column `unlock_token` already exists as it's added by the `down` method.
  • Loading branch information
spaghetticode committed Feb 20, 2019
1 parent 9168776 commit ad56d24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/migrate/20101026184950_rename_columns_for_devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def up
rename_column :spree_users, :current_login_ip, :current_sign_in_ip
rename_column :spree_users, :last_login_ip, :last_sign_in_ip
add_column :spree_users, :authentication_token, :string
add_column :spree_users, :unlock_token, :string
unless column_exists? :spree_users, :unlock_token
add_column :spree_users, :unlock_token, :string
end
add_column :spree_users, :locked_at, :datetime
remove_column :spree_users, :openid_identifier
end
Expand Down

0 comments on commit ad56d24

Please sign in to comment.