app-cloudep-tweeting-service/generate/database
daniel.w e352f006b0 fix social network server 2024-09-03 17:11:12 +08:00
..
mongodb add timeline service 2024-08-31 08:59:08 +08:00
mysql/create init comment and post service 2024-08-28 17:09:01 +08:00
neo4j fix social network server 2024-09-03 17:11:12 +08:00
readme.md init comment and post service 2024-08-28 17:09:01 +08:00

readme.md

migrate

數據庫遷移工具

golang-migrate

安裝 make

brew install Makefile

安裝 golang-migrate

brew install golang-migrate

執行刪除 mysql schema

migrate -source file://database/migrations/mysql -database 'mysql://account:password@tcp(127.0.0.1:3306)/esc_c2c' down

執行安裝 mysql schema

migrate -source file://database/migrations/mysql -database 'mysql://account:password@tcp(127.0.0.1:3306)/esc_c2c' up

執行刪除 mongo schema

migrate -source file://database/migrations/mongodb -database 'mongodb://127.0.0.1:27017/esc_c2c' down

執行安裝 mongo schema

migrate -source file://database/migrations/mongodb -database 'mongodb://127.0.0.1:27017/esc_c2c' up