package

github.com/placeos/models

9.107.5 / published Aug 14, 2026 / repository

PlaceOS entity models.

PlaceOS Models

CI Documentation Changelog

The database models for PlaceOS in crystal.

PlaceOS is a distributed application, with many concurrent event sources that require persistence. We use RethinkDB to unify our database and event bus, giving us a consistent interface to state and events across the system.

Configuration

Environment

KeyDescriptionDefault
PLACE_MAX_VERSIONSNumber of versions to keep of versioned models20
PG_HOSTPostgresql host"localhost"
PG_PORTPostgresql port5432
PG_DBDatabase name or PG_DATABASE"test"
PG_USERDatabase user"postgres"
PG_PASSWORDDatabase password""
PG_QUERYQuery string, that can be used to configure pooling""
PG_LOCK_TIMEOUTTimeout on retrying Advisory lock in seconds5
PG_DATABASE_URLOr provide a Database DSN

Testing

# prune docker images if you have new migrations that need to run
# since the last time migrations image was built
docker system prune --all

# builds migrations and runs tests in a containerised env
./test

Contributing

See CONTRIBUTING.md.

API