Comments (12)
+1 for this feature!
from dbv.
+1
from dbv.
+1 , it is very useful I believe.
from dbv.
+1
from dbv.
Is someone working on this feature?
What I would recommend is to add these methods to the adapters interface:
/**
- return an array that contains all the primary keys of a table
- @example for table 'comment' return array('idArticle', 'idAuthor')
- @param string $name the name of the table
- @return string[]
*/
public function getPrimaryKey($name);/**
- return an array of SQL query to populate the given table name
- @exemple for table 'comment' return array('INSERT INTO comment(idArticle, idAuthor, content) VALUES(1, 11,
test
)', 'INSERT INTO ...', ...)- @param string $name the name of the table
- @return string[]
*/
public function getData($name);
We should as well add a .dbvignore
file:
comment # do not save any data of the
comment
table
comment idAuthor = 10 # do not save comments posted by this user
comment idAuthor between 0 and 10
... etc
from dbv.
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?
from dbv.
Exactly!
Also the ability of automated creating "sql-patches" between "snapshots" would be perfect.
With this feature we can create new versions without writing up SQL-queries (they may be generated automatically).
from dbv.
I installed dbv today and was hoping to have found a tool that does exactly that.
I install a plugin or change the configuration using the backend. I don't know what has changed in the database but it would be so neat if I could pass these changes to my team mates so they don't have to set the same configuration again. Is there any way this could be implemented?
from dbv.
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:
- pull from VCS
- update test_dbv from DBV control panel
- copy test_dbv to test_dbv_2
- change anything you like in test_dbv_2
- then invoke dbv/migrate.sh
- update test_dbv from DBV control panel
- commit/push
from dbv.
+1 !
from dbv.
+1
from dbv.
Any updates or thoughts on this feature? Not sure if you are still actively developing this project. Just curious. Thanks!
from dbv.
Related Issues (20)
- Integration with dbdiff HOT 2
- css attempts to load google font over http HOT 1
- Suggestion for non-linear changes
- [Question] [Best Practices] Should I create a revision too when I create a new table
- [Question] [Best Practices] How to store initialization data for tables
- Cannot see the project website HOT 2
- All On Disk set to "No" HOT 3
- Feedback for errors in Revision scripts HOT 3
- Is this project abandoned? HOT 1
- data changes
- why it it too slow? HOT 1
- HTTP Authentication not working HOT 2
- use multiple databases
- GitHub - Integration
- Need for other Adapters?
- Website is currently down HOT 1
- Question for sigle user (From newbie)
- Problem: Same name for stored procedures and tables
- How to configure sql server adapter?
- Expired certificate on https://dbv.vizuina.com/ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbv.