Skip to content

Commit 0f2c630

Browse files
author
David Heinemeier Hansson
committed
Set the record straight on the purpose and utility of db/schema.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8124 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
1 parent 2e12afa commit 0f2c630

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

activerecord/lib/active_record/schema_dumper.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@ def header(stream)
3737
define_params = @info ? ":version => #{@info['version']}" : ""
3838

3939
stream.puts <<HEADER
40-
# This file is autogenerated. Instead of editing this file, please use the
41-
# migrations feature of ActiveRecord to incrementally modify your database, and
40+
# This file is auto-generated from the current state of the database. Instead of editing this file,
41+
# please use the migrations feature of ActiveRecord to incrementally modify your database, and
4242
# then regenerate this schema definition.
43+
#
44+
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
45+
# to create the application database on another system, you should be using db:schema:load, not running
46+
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
47+
# you'll amass, the slower it'll run and the greater likelihood for issues).
48+
#
49+
# It's strongly recommended to check this file into your version control system.
4350
4451
ActiveRecord::Schema.define(#{define_params}) do
4552

0 commit comments

Comments
 (0)