You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
288 B
Ruby
8 lines
288 B
Ruby
10 years ago
|
class SetTemporaryUsernameOnUsers < ActiveRecord::Migration
|
||
|
def change
|
||
|
change_column :users, :username, :string, null: true
|
||
|
execute "UPDATE users SET temporary_username = username WHERE dummy IS TRUE"
|
||
|
execute "UPDATE users SET username = NULL WHERE dummy IS TRUE"
|
||
|
end
|
||
|
end
|