-
Notifications
You must be signed in to change notification settings - Fork 246
compare two database states and generate sql for difference #65
Comments
+1 for this feature! |
+1 |
+1 , it is very useful I believe. |
+1 |
Is someone working on this feature? What I would recommend is to add these methods to the adapters interface:
We should as well add a
|
Hmm, so what you would need is a "snapshot" feature, that would save the current schema for each table, and that could then be compared with a more recent snapshot? |
Exactly! |
I installed dbv today and was hoping to have found a tool that does exactly that. |
I'm a new in bash scripting, but this can give you some ideas #!/bin/bash
REVISION_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/data/meta/revision"
REVISIONS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/data/revisions/"
CUR_REVISION=$(cat "$REVISION_PATH")
CUR_REVISION=$(($CUR_REVISION+1))
NEW_REVISION="$REVISIONS_DIR"$CUR_REVISION/`date '+%Y-%m-%d'`.sql
mkdir "$REVISIONS_DIR"$CUR_REVISION
mysqldbcompare --server1 root:password@localhost:/tmp/mysql/mysql.sock test_dbv:test_dbv_2 --run-all-tests -d sql -a > "$NEW_REVISION" I use mysqldbcompare util (http://dev.mysql.com/doc/mysql-utilities/1.3/en/mysqldbcompare.html) for generating and creating revision sql file. In my case I have 2 databases: test_dbv - remote DB and test_dbv_2 - local development DB. U can think about it like test_dbv - snapshot before starting any changes, and test_dbv_2 - it's snapshot after changes. Workflow can look like this:
|
+1 ! |
+1 |
Any updates or thoughts on this feature? Not sure if you are still actively developing this project. Just curious. Thanks! |
Hello and thank you for your great work!
Scenario:
Do you have any thoughts how to approach the issue?
Thank you,
Radu G.
The text was updated successfully, but these errors were encountered: