app-cloudep-order-server/generate/database
王性驊 8b76f7cd1e feature/order_base (#1)
Co-authored-by: daniel.w <daniel.w@intteam.net>
Reviewed-on: #1
2024-10-23 09:50:11 +00:00
..
mongodb feature/order_base (#1) 2024-10-23 09:50:11 +00:00
readme.md init project 2024-10-05 14:55:28 +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