placeos-models

Version, currently 9.107.5100 versions

github.com/PlaceOS/models

PlaceOS entity models.

2 stars
0 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

| Key | Description | Default | | ------------------------- | ---------------------------------------------- | ----------- | | PLACE_MAX_VERSIONS | Number of versions to keep of versioned models | 20 | | PG_HOST | Postgresql host | "localhost" | | PG_PORT | Postgresql port | 5432 | | PG_DB | Database name or PG_DATABASE | "test" | | PG_USER | Database user | "postgres" | | PG_PASSWORD | Database password | "" | | PG_QUERY | Query string, that can be used to configure pooling | "" | | PG_LOCK_TIMEOUT | Timeout on retrying Advisory lock in seconds | 5 | | PG_DATABASE_URL | Or 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.