diff options
Diffstat (limited to 'guides/source/migrations.md')
-rw-r--r-- | guides/source/migrations.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md index 4f122945ba..a87a86cc6d 100644 --- a/guides/source/migrations.md +++ b/guides/source/migrations.md @@ -375,7 +375,7 @@ will produce a migration that looks like this ```ruby class AddDetailsToProducts < ActiveRecord::Migration def change - add_column :products, :price, :precision => 5, :scale => 2 + add_column :products, :price, :precision => 5, :scale => 2 add_reference :products, :user, :polymorphic => true, :index => true end end @@ -824,10 +824,10 @@ Both migrations work for Alice. Bob comes back from vacation and: -# Updates the source - which contains both migrations and the latest version of -the Product model. -# Runs outstanding migrations with `rake db:migrate`, which -includes the one that updates the `Product` model. +* Updates the source - which contains both migrations and the latest version of + the Product model. +* Runs outstanding migrations with `rake db:migrate`, which + includes the one that updates the `Product` model. The migration crashes because when the model attempts to save, it tries to validate the second added column, which is not in the database when the _first_ |