Discover Packages
github.com/datumforge/datum
db
package
Version:
v0.5.2
Opens a new window with list of versions in this module.
Published: May 17, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
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
libsql
sqlite
postgres
Local Development
Config Examples
Libsql
This will write to a local file datum.db
, already included in .gitignore
db:
debug: true
driver_name: "libsql"
primary_db_source: "file:datum.db"
run_migrations: true
Sqlite
This will write to a local file datum.db
, already included in .gitignore
db:
debug: true
driver_name: sqlite3
primary_db_source: "datum.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 using task 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-datum.turso.io?authToken=$TURSO_TOKEN" # set TURSO_TOKEN to value
run_migrations: false
Expand ▾
Collapse ▴
Documentation
¶
Package db provides an embedded filesystem containing all the database migrations
GooseMigrationsPG contain an embedded filesystem with all the goose migration files for postgres
GooseMigrationsSQLite contain an embedded filesystem with all the goose migration files for sqlite
Migrations contain an embedded filesystem with all the sql migration files
Source Files
¶
Click to show internal directories.
Click to hide internal directories.