Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

comparedb improvements (ignoring, more context, error handling) #52

Merged
merged 6 commits into from Jan 4, 2013

Conversation

Projects
None yet
2 participants
Contributor

iivvoo commented Oct 4, 2012

I've noticed a couple of issues with nashvegas (comparedb):

  • it doesn't always provide enough content to find which table has changed (and it's not always trivial to figure out what the table name should be) -> added a "-l" option to provide lines of context
  • it provides noise by comparing irrelevant data such as comments and "ADD CONSTRAINT" lines. These can be selectively ignored using a "-i " flag
  • if something is wrong with a migration (e.g. an empty .sql file that I was about to write), comparedb no longer works. But more annoying, the compare database is not removed; fixed this.

Additionally, syncdb is make do work again somewhat using the --skip-migrations flag. This allows comparedb to work (create new database+syncdb) if there are migrations (which cannot be applied before the real syncdb has taken place)

Ivo van der Wijk added some commits Oct 4, 2012

Fix syncdb, make it work on empty databases again
The --skip-migrations flag will make it skip the nashvegas migrations,
which will fail on new, empty databases. This will also make 'comparedb'
work again if there are migrations in general.

paltman added a commit that referenced this pull request Jan 4, 2013

Merge pull request #52 from iivvoo/master
comparedb improvements (ignoring, more context, error handling)

@paltman paltman merged commit 6e95ed3 into paltman-archive:master Jan 4, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment