Rails - authoritative source for your database schema?
Posted
by
keruilin
on Stack Overflow
See other posts from Stack Overflow
or by keruilin
Published on 2011-02-14T15:07:42Z
Indexed on
2011/02/14
15:25 UTC
Read the original article
Hit count: 296
I have Rails app, and every once in a while, when I bring new developer onboard they exclaim that they should be able to produce the current DB schema in their dev environment by running the whole history of the migrations. I personally don't think that migrations is the authoritative source for your schema. Right now what we do is load a production copy of the DB, with the current schema, onto the dev machine. And, from there, the schema can be maintained via incremental migrations.
So my question are:
- What is the authoritative source of your schema on a Rails project?
- What is now considered the best-practice way to maintain your DB schema?
© Stack Overflow or respective owner