01-control-plane.sql19 lines · main
| 1 | -- Postgres init script — runs once on first boot of the `postgres` |
| 2 | -- (control-plane) container. |
| 3 | -- |
| 4 | -- Post ADR-0002 (converge-on-doltgres): the control plane is stock |
| 5 | -- Postgres and holds ONLY meta-state — users, orgs, projects, billing, |
| 6 | -- secrets, auth. Customer data lives in the DoltGres data plane as one |
| 7 | -- DATABASE per project, created on demand by the api. So there is no |
| 8 | -- `briven_data` database to create here any more — the data plane is a |
| 9 | -- separate engine (the `doltgres` service), not a second DB in this |
| 10 | -- cluster. |
| 11 | -- |
| 12 | -- The `briven_control` database itself is created by the image from |
| 13 | -- POSTGRES_DB; this script only enables the extensions drizzle expects. |
| 14 | -- The pgvector image pre-loads the vector lib; CREATE EXTENSION just |
| 15 | -- enables it for this database. |
| 16 | |
| 17 | \c briven_control |
| 18 | CREATE EXTENSION IF NOT EXISTS vector; |
| 19 | CREATE EXTENSION IF NOT EXISTS pg_trgm; |