You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
270 B
9 lines
270 B
11 years ago
|
class AddFullNameToUsers < ActiveRecord::Migration
|
||
|
def change
|
||
|
add_column :users, :full_name, :string
|
||
|
execute "UPDATE users SET full_name = CONCAT(first_name, ' ', last_name)"
|
||
|
remove_column :users, :first_name
|
||
|
remove_column :users, :last_name
|
||
|
end
|
||
|
end
|