How do you run migrations forward?
How do you create a new migration?
What should the
self.down method do in a
What Rails data type should you use to represent currency values?
How do you add a new field to a record?
rake db:migrate command.
To keep in line with Rails’ timestamp-based naming convention, it’s
best to use
NameOfMigration, and then edit the resulting file in the
method defines what should happen if the migration is rolled back using
rake db:rollback. The tables, column, and indexes
self.up need a corresponding removal
type is the most precise way to keep track of money. It can keep track of
cents to the right of the decimal point and will contain values with a fixed number of
decimal places much more accurately than
New fields get created with
“fields” are represented as columns and the records that contain them as