diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-09-11 11:47:07 +0100 |
---|---|---|
committer | Frederick Cheung <frederick.cheung@gmail.com> | 2008-09-11 11:47:07 +0100 |
commit | c329a567529f1fb7ac4204fc43940bfb45ff58a4 (patch) | |
tree | bf27a8fa5d9899ac2917a2cad3606c7b941ea175 /railties/doc/guides/migrations | |
parent | c6da7c536c13555eba6aca82e0b5385b86b21211 (diff) | |
download | rails-c329a567529f1fb7ac4204fc43940bfb45ff58a4.tar.gz rails-c329a567529f1fb7ac4204fc43940bfb45ff58a4.tar.bz2 rails-c329a567529f1fb7ac4204fc43940bfb45ff58a4.zip |
Mention schema.rb as a place for seing model attributes
Diffstat (limited to 'railties/doc/guides/migrations')
-rw-r--r-- | railties/doc/guides/migrations/scheming.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/doc/guides/migrations/scheming.txt b/railties/doc/guides/migrations/scheming.txt index 8dd58f12d6..cb194d11df 100644 --- a/railties/doc/guides/migrations/scheming.txt +++ b/railties/doc/guides/migrations/scheming.txt @@ -7,6 +7,8 @@ There is no need (and it is error prone) to deploy a new instance of an app by r For example, this is how the test database is created: the current development database is dumped (either to `schema.rb` or `development.sql`) and then loaded. +Schema files are also useful if want a quick look at what attributes an Active Record object has. This information is not in the model's code and is frequently spread across several migrations but is all summed up in the schema file. The http://agilewebdevelopment.com/plugins/annotate_models[annotate_models] plugin, which automatically adds (and updates) comments at the top of each model summarising the schema, may also be of interest. + === Types of schema dumps === There are two ways to dump the schema. This is set in `config/environment.rb` by the `config.active_record.schema_format` setting, which may be either `:sql` or `:ruby`. |