Migrations

Overview

Managing Tables and Columns

Things to be Aware of

Two Special Columns

created_at and updated_at are maintained automatically by Rails and keep track of when a record was created and last updated

Migration Example


create_table "users", :force => true do |t|
  t.string :login, :email, :remember_token
  t.string :salt, :crypted_password, :limit => 40
  t.datetime :remember_token_expires_at
  t.timestamps # created_at and updated_at
end