diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-09-07 22:53:49 +0100 |
---|---|---|
committer | Frederick Cheung <frederick.cheung@gmail.com> | 2008-09-07 22:53:49 +0100 |
commit | 22c8ebedec2e2eeb4f5084b3d99fd9ea4774def9 (patch) | |
tree | d421bfd70a3a6b4644397ca33e7191319fd022e2 /railties/doc/guides/migrations/anatomy_of_a_migration.txt | |
parent | 5f45670f075c6100f4443fb7c30c94013c1d2fd4 (diff) | |
download | rails-22c8ebedec2e2eeb4f5084b3d99fd9ea4774def9.tar.gz rails-22c8ebedec2e2eeb4f5084b3d99fd9ea4774def9.tar.bz2 rails-22c8ebedec2e2eeb4f5084b3d99fd9ea4774def9.zip |
ActiveRecord -> Active Record
Diffstat (limited to 'railties/doc/guides/migrations/anatomy_of_a_migration.txt')
-rw-r--r-- | railties/doc/guides/migrations/anatomy_of_a_migration.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/doc/guides/migrations/anatomy_of_a_migration.txt b/railties/doc/guides/migrations/anatomy_of_a_migration.txt index ca557ab2f9..86b00c7185 100644 --- a/railties/doc/guides/migrations/anatomy_of_a_migration.txt +++ b/railties/doc/guides/migrations/anatomy_of_a_migration.txt @@ -20,12 +20,12 @@ class CreateProducts < ActiveRecord::Migration end ------------------------ -This migration adds a table called products with a string column called `name` and a text column called `description`. A primary key column called `id` will also be added, however since this is the default we do not need to ask for this. The timestamp columns `created_at` and `updated_at` which ActiveRecord populates automatically will also be added. Reversing this migration is as simple as dropping the table. +This migration adds a table called products with a string column called `name` and a text column called `description`. A primary key column called `id` will also be added, however since this is the default we do not need to ask for this. The timestamp columns `created_at` and `updated_at` which Active Record populates automatically will also be added. Reversing this migration is as simple as dropping the table. === Migrations are classes A migration is a subclass of `ActiveRecord::Migration` that implements two class methods: +up+ (perform the required transformations) and +down+ (revert them). -ActiveRecord provides methods that perform common data definition tasks in a database independent way (you'll read about them in detail later): +Active Record provides methods that perform common data definition tasks in a database independent way (you'll read about them in detail later): * `create_table` * `change_table` |