Browse files

Make destructive nature of auto_migrate! clearer

  • Loading branch information...
1 parent b3b55fb commit 731083b7fb336f1a26db9987f87c01b471f29151 @namelessjon namelessjon committed Apr 26, 2010
Showing with 12 additions and 8 deletions.
  1. +12 −8 getting-started.markdown
20 getting-started.markdown
@@ -159,19 +159,23 @@ Set up your database tables
{% highlight ruby %}
{% endhighlight %}
-This will issue the necessary `CREATE` statements to define each storage according
-to their properties.
+This will issue the necessary `CREATE` statements (`DROP`ing the table first, if
+it exists) to define each storage according to their properties. After
+`auto_migrate!` has been run, the database should be in a pristine state, reset
+back to the starting state.
-You could also do:
+This can be too extreme, so you could also do:
{% highlight ruby %}
{% endhighlight %}
+This tries to make the schema match the model. It will `CREATE` new tables, and
+add columns to existing tables. It won't change any existing columns though
+(say, to add a NOT NULL constraint) and it doesn't drop any columns. Both these commands
+also can be used on an individual model (e.g. `Post.auto_migrate!`)

0 comments on commit 731083b

Please sign in to comment.