- Initialize project
go run gin/cmd/migrate/main.go init
- Refresh project
go run gin/cmd/migrate/main.go refresh
- Migrate project databases
go run gin/cmd/migrate/main.go migrate
- Rollback project databases
go run gin/cmd/migrate/main.go rollback
Notice
- When you exec migrate or refresh command, it's will seed data to database.
- If you just exepct create tables to your database and don't want to seed datas into this tables, you need to use
--seed=false
or-s=false
.
- Run project
go run gin/main.go
# or
go build -o example gin/main.go
./example