Here is a quick and clear tutorial about how to change a table adding one column:
-
In your application’s root:
$ rails generate migration add_column
-
Open for editing your timestamp_add_column.rb with your favorite editor:
$ sudo nano db/migration/timestamp_add_column.rb
-
Edit you timestamp_add_column.rb:
class AddColumn < ActiveRecord::Migration
def self.up
add_column :table_name, :column_name, :type
end
def self.down
remove_column :table_name, :column_name
end
end
-
Execute your change by running the migration:
$ rake db:migrate
-
Do Not Forget to Take a Look…
VMWare VMware, VMware Tools, VMware Tools