The backend repository for Mensatt written in go.
- Docker & Docker Compose
- Go 1.22.4
- Generate all:
make generate
- Run only gqlgen:
make gqlgen
- Run only entc:
make entc
- Start dev server:
make up
- Stop the server:
make down
Migrations require Atlas to be installed. See here for installation instructions.
Create a new migration:
atlas migrate diff <migration_name> \
--dir "file://internal/database/migrations" \
--to "ent://internal/database/schema" \
--dev-url "postgres://mensatt:mensatt@localhost:5432/mensatt?search_path=public&sslmode=disable" \
--format '{{ sql . " " }}'
The --format
flag uses a tab as indentation. If you want to manually edit this command you can use
ctrl + v + tab
to insert a tab character in your shell.