- update schema
- generate updated code for db operations, run:
go generate ./db/ent
- Create migration files by running:
go run db/make-migrations.go [migration name]
- Apply migration using
golang-migrate
. in project_root run:
migrate -source 'file://db/migrations' -database 'postgresql://postgres:postgres@127.0.0.1/test_db?sslmode=disable' up