# Creation Knowledge Database

This directory contains SQL migrations for the formal cloud PostgreSQL state
store. Real connection values must stay in local or cloud environment files,
not in git.

Current formal database target:

- Database: `creation_knowledge_prod`
- Schema: `creation_knowledge`
- Application role: `ck_app`
- First migration: `migrations/001_creation_knowledge_schema.sql`

Local development currently connects through an SSH tunnel:

```bash
ssh -i /path/to/private-key \
  -L 6543:127.0.0.1:5432 <cloud-user>@<cloud-host>
```

Then use `CK_DB_HOST=127.0.0.1` and `CK_DB_PORT=6543` locally. On the cloud
machine itself, use `CK_DB_HOST=127.0.0.1` and `CK_DB_PORT=5432`.

Do not use `OPEN_AIGC_PG_*` for this state store. Those settings are reserved
for the upstream Open AIGC category-tree/history database.
