Documentation
Database Setup
PostgreSQL, MySQL or SQLite through GORM.
goclean supports three databases, all accessed through GORM:
- PostgreSQL
- MySQL
- SQLite
Database access is isolated in internal/infrastructure. Usecases only ever see repository interfaces, so switching or mocking a database does not touch business logic.
Migrations
Migrations live in the migrations directory. make:module generates a migration for every new module.
Running a database locally
For PostgreSQL and MySQL, the generated Docker Compose file defines the database service. See Docker Setup. SQLite needs no separate service.