aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/migrations.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-14 01:00:03 -0700
committerXavier Noria <fxn@hashref.com>2010-04-14 01:00:03 -0700
commit9a4fdff0af0ba05ad77096ce835aeb4bf343a53f (patch)
treed4657c9e64fdc050695dd58cf419241ace32e7a6 /railties/guides/source/migrations.textile
parent2ff5f38abb4a44ed5356c34b40d30d446fb63408 (diff)
parente090898c5e98e853828208343b3911a229563b62 (diff)
downloadrails-9a4fdff0af0ba05ad77096ce835aeb4bf343a53f.tar.gz
rails-9a4fdff0af0ba05ad77096ce835aeb4bf343a53f.tar.bz2
rails-9a4fdff0af0ba05ad77096ce835aeb4bf343a53f.zip
Merge commit 'docrails/master'
Diffstat (limited to 'railties/guides/source/migrations.textile')
-rw-r--r--railties/guides/source/migrations.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/migrations.textile b/railties/guides/source/migrations.textile
index 558cbb4771..6f88ed6b3f 100644
--- a/railties/guides/source/migrations.textile
+++ b/railties/guides/source/migrations.textile
@@ -568,7 +568,7 @@ In many ways this is exactly what it is. This file is created by inspecting the
There is however a trade-off: +db/schema.rb+ cannot express database specific items such as foreign key constraints, triggers or stored procedures. While in a migration you can execute custom SQL statements, the schema dumper cannot reconstitute those statements from the database. If you are using features like this then you should set the schema format to +:sql+.
-Instead of using Active Record's schema dumper the database's structure will be dumped using a tool specific to that database (via the +db:structure:dump+ Rake task) into +db/#{RAILS_ENV}_structure.sql+. For example for PostgreSQL the +pg_dump+ utility is used and for MySQL this file will contain the output of +SHOW CREATE TABLE+ for the various tables. Loading this schema is simply a question of executing the SQL statements contained inside.
+Instead of using Active Record's schema dumper the database's structure will be dumped using a tool specific to that database (via the +db:structure:dump+ Rake task) into +db/#{Rails.env}_structure.sql+. For example for PostgreSQL the +pg_dump+ utility is used and for MySQL this file will contain the output of +SHOW CREATE TABLE+ for the various tables. Loading this schema is simply a question of executing the SQL statements contained inside.
By definition this will be a perfect copy of the database's structure but this will usually prevent loading the schema into a database other than the one used to create it.