From c329a567529f1fb7ac4204fc43940bfb45ff58a4 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Thu, 11 Sep 2008 11:47:07 +0100 Subject: Mention schema.rb as a place for seing model attributes --- railties/doc/guides/migrations/scheming.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties') 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`. -- cgit v1.2.3