Download the PHP package shadiakiki1986/db-diff without Composer
On this page you can find all versions of the php package shadiakiki1986/db-diff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package db-diff
db-diff
Console application to version control database table contents and show their daily diff
Does it in 3 steps
- Set up PHP-ODBC connections and store your database connection in
/etc/odbc.ini
- export table from database via ODBC connection to git via git-rest-api server
- export table again after edits
- get
git diff
results
Running periodic exports gives more points in time to diff
against
Similar tools (didn't try them)
- Red gate: similar to this repo, can version control "static data"
- git-sql: diff of sql data dumps
- Nayjest/db-diff: diff of two tables with the same structure
- PM-Connect/db-diff: diff of two database structures
Usage
(Example usage: docker-db-diff )
-
Requirements:
- PDO-ODBC driver and a ready connection
- a node-git-rest-api server with
deep-diff-yml
configured for yml files
-
Set env var for
git-rest-api
server - Synopsis
Note: the <DB>..<TABLE>
notation is SQLServer-specific. For MySql, use <DB>.<TABLE>
(single dot)
Reset:
Testing
- (optional) Set up a mysql database to test against locally:
Test with
-
(optional) Run the
git-rest-api
server locally: - (optional) Set up dev env using option 1 or 2 below
- Install dependencies:
composer install
- Run tests:
composer test
Option 1: Dev env with vagrant
Option 2: Manually
Install odbc
drivers like docker-php7...:
[sudo] apt-get unixodbc unixodbc-dev tdsodbc php7.0-odbc
Test installation with : php -i|grep odbc
Install mysql-odbc drivers
- ubuntu 13.04:
apt-get install libmyodbc
- ubuntu 16.04:
Set up odbc configuration
Test with
All versions of db-diff with dependencies
ext-yaml Version *
symfony/console Version ^3.2
twig/twig Version ^2.0
ext-pdo Version *
ext-pdo_odbc Version *