[Cruisecontrolrb-users] Conflicts with schema.rb?

Will Sargent will.sargent at gmail.com
Fri May 2 02:02:22 EDT 2008


On Wed, Apr 30, 2008 at 12:27 PM, Alexey Verkhovsky
<averkhov at thoughtworks.com> wrote:
> > When people check in files, occasionally CruiseControl will error out
>  > saying that there's a conflict in schema.rb.
>
>  schema.rb is auto-generated on every build. If you have it checked in, by
>  the time the build is over, you may have a locally changed schema.rb and
>  when CC.rb tries to run an update, it may end up with a conflict.
>
>  The "Rails Way" is to have schema.rb in svn:ignore, and build your database
>  from migrations.

That's what I thought as well.  Then I saw this:

http://dev.rubyonrails.org/changeset/8124

 	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.

So if you're SUPPOSED to check it into your version control system...
how do you manage it once it's there?

Will.


More information about the Cruisecontrolrb-users mailing list