Skip to content

Commit

Permalink
added the list of reversible commands in the newer migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Apr 26, 2011
1 parent b105dc4 commit c1132f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions railties/guides/source/migrations.textile
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,14 @@ h4. Writing Your +change+ Method

The +change+ method removes the need to write both +up+ and +down+ methods in those cases that Rails know how to revert the changes automatically. Currently, the +change+ method supports only these migration definitions:

* +create_table+
* +add_column+
* +rename_column+
* +add_index+
* +add_timestamp+
* +create_table+
* +remove_timestamps+
* +rename_column+
* +rename_index+
* +rename_table+

If you're going to use other methods, you'll have to write the +up+ and +down+ methods normally.

Expand Down

0 comments on commit c1132f7

Please sign in to comment.