# README
Database Support
Dependencies
- ent - insane entity mapping tool, definitely not an ORM but kind of an ORM
- atlas - Schema generation and migration
- entx - Wrapper to interact with the ent
Supported Drivers
Local Development
Config Examples
Libsql
- This will write to a local file
template.db
, already included in.gitignore
db:
debug: true
driver_name: "libsql"
primary_db_source: "file:template.db"
run_migrations: true
Sqlite
- This will write to a local file
template.db
, already included in.gitignore
db:
debug: true
driver_name: sqlite3
primary_db_source: "template.db"
run_migrations: true
Postgres
- Postgres is included in
docker/docker-compose-fga.yml
and the same instance can be used for development. The following connection string should work when usingtask docker:all:up
db:
debug: true
driver_name: postgres
primary_db_source: "postgres://postgres:password@postgres:5432?sslmode=disable"
run_migrations: true
Turso
- Replace the url with your turso database url and token
db:
debug: true
driver_name: libsql
primary_db_source: "https://datum-golanglemonade.turso.io?authToken=$TURSO_TOKEN" # set TURSO_TOKEN to value
run_migrations: false
# Variables
GooseMigrationsPG contain an embedded filesystem with all the goose migration files for postgres
go:embed migrations-goose-postgres/*.sql.
GooseMigrationsSQLite contain an embedded filesystem with all the goose migration files for sqlite
go:embed migrations-goose-sqlite/*.sql.
Migrations contain an embedded filesystem with all the sql migration files
go:embed migrations/*.sql.