diff --git a/common/data/README.md b/common/data/README.md index 150b406a2..67e206884 100644 --- a/common/data/README.md +++ b/common/data/README.md @@ -4,31 +4,24 @@ JSON Schemas and Jupyter Notebooks for Casimir data modeling, exploration, and a ## Database Schemas -Find the core JSON object schemas in [src/schemas/](src/schemas/). These are the source of truth for data modeling in Casimir. When we deploy our Glue and Postgres tables, we use the schemas to generate columns from the object properties. See the reference tables below (one for Glue, and one for Postgres) for descriptions and links to the current schemas. +Find the core JSON object schemas in [src/schemas](src/schemas). These are the source of truth for data modeling in Casimir. When we deploy our Glue and Postgres tables, we use the schemas to generate columns from the object properties. See the reference table below for the database, table, file, and description of each schema. -> 🚩 To make a schema change, create a branch from `develop`, edit the JSON, and then make a PR to `develop`. +| Database | Table | Schema | Description | +| --- | --- | --- | --- | +| Glue | `events` | [event.schema.json](src/schemas/event.schema.json) | on or off-chain event | +| Glue | `aggs` | [agg.schema.json](src/schemas/agg.schema.json) | aggregate of events | +| Postgres | `accounts` | [account.schema.json](src/schemas/account.schema.json) | wallet account | +| Postgres | `users` | [user.schema.json](src/schemas/user.schema.json) | user profile | -### Glue +> 🚩 To iterate on a schema in context, see the commands below. To deploy a schema change, create a branch from `develop`, edit the JSON, and then make a PR to `develop`. -| Table | Schema | Description | -| --- | --- | --- | -| `events` | [event.schema.json](src/schemas/event.schema.json) | on or off-chain event | -| `aggs` | [agg.schema.json](src/schemas/agg.schema.json) | aggregate of events | - -### Postgres - -| Table | Schema | Description | -| --- | --- | --- | -| `accounts` | [account.schema.json](src/schemas/account.schema.json) | wallet account | -| `users` | [user.schema.json](src/schemas/user.schema.json) | user profile | - -Run a local Postgres instance with the schemas above. +Run a local Postgres instance with the *current schemas*. ```zsh npm run dev:postgres --workspace @casimir/data ``` -Run and watch a local Postgres instance. +Run a local Postgres instance and *watch the schemas for changes*. ```zsh npm run watch:postgres --workspace @casimir/data