placeos-models

Version, currently 9.107.5100 versions

github.com/placeos/models

PlaceOS entity models.

2 stars
7 dependents
License: NOASSERTION

Installation

# Add this to your shard.yml
dependencies:
  placeos-models:
    github: placeos/models
    version: ~> 9.107.5

Then run:

shards install

shard.yml

Crystal
~> 1.4

Dependencies

Runtime Dependencies

  • jwt*github: crystal-community/jwt
  • pars*github: spider-gazelle/pars
  • ulid>= 0.1github: place-labs/ulid
  • future*github: crystal-community/future.cr
  • pg-orm*github: spider-gazelle/pg-orm
  • cron_parser*github: kostya/cron_parser
  • CrystalEmail*github: place-labs/CrystalEmail
  • active-model~> 4.4github: spider-gazelle/active-model
  • neuroplastic~> 1.6github: spider-gazelle/neuroplastic
  • upload-signer*github: spider-gazelle/upload-signer
  • place_calendar*github: PlaceOS/calendar
  • json-merge-patch*github: caspiano/json-merge-patch
  • placeos-log-backend>= 0.11.0github: place-labs/log-backend

Development Dependencies

  • ameba*github: crystal-ameba/ameba, branch: masterdev
  • faker*github: askn/fakerdev
  • timecop*github: crystal-community/timecop.crdev

README

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.