Fix ClickHouse port inconsistency in local-dev docs and add apply-graph-schema.sh
### Problem to Solve Applying the GKG graph schema during local setup is fragile and the docs are inconsistent about ClickHouse ports. `docs/dev/local-development.md` tells contributors to apply `config/graph.sql` with a hand-rolled shell pipeline that strips comments and splits on `;`: ```shell sed 's/--.*$//' config/graph.sql | tr '\n' ' ' | sed 's/;/;\n/g' | \ while IFS= read -r stmt; do [ -n "$stmt" ] && clickhouse client --host localhost --port 9001 \ --database gkg-development --query "$stmt" done ``` This is brittle (the `--` comment strip breaks on any `--` inside a string literal, and naive `;` splitting can mangle statements) and it is duplicated inline in the docs. The same doc also mixes ports: it uses the native port `9001` for `clickhouse client` (lines 51, 60, 326) but the HTTP port `8123` in the troubleshooting section (line 321), with no explanation of which is which. ### Proposed Solution - Add `scripts/apply-graph-schema.sh` that applies `config/graph.sql` statement-by-statement against a target database, with the host/port/database configurable via flags or env vars (defaulting to the documented local values). - Replace the inline pipeline in `docs/dev/local-development.md` with a call to the new script. - Add a one-line note clarifying the two ports: native TCP (`9001`) for `clickhouse client`, HTTP (`8123`) for `curl`/health checks. **Difficulty:** ~"orbit_hackathon::L1" (run the script against a local ClickHouse to validate) **Estimated effort:** ~2-3 hours **Validation steps:** 1. Start a local ClickHouse (per `docs/dev/local-development.md`). 2. Run `scripts/apply-graph-schema.sh` against the `gkg-development` database. 3. Confirm the graph tables from `config/graph.sql` exist: `clickhouse client --port 9001 --database gkg-development --query "SHOW TABLES"`. 4. Re-run the script and confirm it is idempotent (no errors on re-apply). <details> <summary><b>Agent context</b></summary> Evidence verified against repo `main`: - `docs/dev/local-development.md:51,58-63` — inline schema-apply pipeline using native port 9001. - `docs/dev/local-development.md:321` — troubleshooting uses HTTP port 8123 (`curl "http://localhost:8123/ping"`). - `docs/dev/local-development.md:326` — native port 9001 again. The script should keep the "one statement per request" behavior because ClickHouse's HTTP/native interfaces do not support multi-statement execution for DDL the way the docs note at line 54-55. A more robust splitter than `sed`/`tr` is the main value-add. Origin: proposal #5 from dgruzd/tasks#2798. </details>
issue