vielhuber / kiwi
kiwi provides a git-like experience for relational databases.
1.0.4
2017-07-15 22:18 UTC
Requires
- php: >=7.0
- vielhuber/dbhelper: ^1.0
- vielhuber/magicdiff: ^1.0
- vielhuber/magicreplace: ^1.2
- vielhuber/stringhelper: ^1.0
README
kiwi provides a git-like experience for relational databases.
This is currently a proof-of-concept.
Features
- No sql triggers
- No binary / ddl logs
- Support for mysql & mariadb
- Works with any shared hosting provider that runs linux
- Detects data and schema changes, at the same time
- Fast
- Command line tool usage
- Requires only ssh access to remote repository
- Search/replace layer for environment specific values (serialize safe)
- Works together with WordPress, Shopware or any other raw sql database
Similiar tools
Planned
- Support for postgresql
- Advanced conflict solver
- Support for syncing views, trigger, functions and transactions
- Test suite
- Branching and other git-like features
Disclaimer
This does not prevent you from taking backups. Use this script at your own risk.
Dependencies
Installation
Install/update globally:
wget https://raw.githubusercontent.com/vielhuber/kiwi/master/kiwi.phar
chmod +x kiwi.phar
sudo mv kiwi.phar /usr/local/bin/kiwi
Usage
First setup kiwi on client:
kiwi init
Change settings for local/remote database:
nano .kiwi/config.json
Get current status:
kiwi status
Push changes to remote repo:
kiwi push
Pull state of remote repo:
kiwi pull