Added migration that downcases all usernames. This should solve the "Can only login via password reset" problems
This commit is contained in:
parent
89c3e30663
commit
b297648072
2 changed files with 14 additions and 1 deletions
13
db/migrate/20110421120744_downcase_usernames.rb
Normal file
13
db/migrate/20110421120744_downcase_usernames.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class DowncaseUsernames < ActiveRecord::Migration
|
||||
def self.up
|
||||
execute <<SQL
|
||||
UPDATE users
|
||||
SET users.username = LOWER(users.username)
|
||||
WHERE users.username != LOWER(users.username)
|
||||
SQL
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise ActiveRecord::IrreversibleMigration.new
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110406203720) do
|
||||
ActiveRecord::Schema.define(:version => 20110421120744) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id", :null => false
|
||||
|
|
|
|||
Loading…
Reference in a new issue