- Create an
.env
file - Run
docker compose up
(it will start the db and run the migrations) - Run
go run .
- Run
docker compose down --volumes
to reset the database state, then rundocker compose up
(you should be able to see all migrations running again)
- Install migrate cli from
https://github.com/golang-migrate/migrate/tree/master/cmd/migrate
- Run
migrate create -ext sql -dir db/migrations <short_name_describing_the_migration>
- Restart the docker container
- Some packages require the docker compose file to run (like the
store
package) - Some packages make use of mocks. Install
moq
to generate mocks for interfaces
- ciaoooooooo