Build application
go build -o waterbottle.exe cmd/waterbottle/main.go
Add this application to PATH and create WATERBOTTLE_PATH environment variable with path to executable file
eg D:\Apps\Waterbottle\
You should create 2 files one UP and one DOWN event example:
initial_0001_UP.sql
initial_0001_DOWN.sql
UP file consist of either CREATE TABLE or ALTER TABLE queries DOWN file consist of rollback UP queries
EXAMPLE
initial_0001_UP.sql
CREATE TABLE test (
ID int,
FirstName varchar(255),
LastName varchar(255)
);
initial_0001_DOWN.sql
DROP TABLE test;
- migrate
- name - eg Initial-0001
- UP/DOWN migration
- Database URL Address
Example migrate command: waterbottle migrate initial_0001 UP username:password@tcp(127.0.0.1:3306)/testdb
- help
- Go - Programming Language
- Yusuf Yakubov - Whole work
This project is licensed under the MIT License - see the LICENSE file for details
- Fork it
- Create your feature branch
git checkout -b feature/foo
- Commit your changes
git commit -m 'New feature'
- Push to the branch
git push origin feature/foo
- Create a new Pull Request
- Bitcoin: 36jW1LyMEicXFLrQLnFnswqc1hxBEkrhwJ
- Ethereum: 0xaD7c500FD3947E85d64CbF6A5d1D31372ed0601A
- Webmoney (WMZ): Z280011393319
- Webmoney (WMR): R923631667215