refactor: migrate legacy wire namespace to wrn
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:51:15 +05:30
parent ec23dd4c93
commit 2c960fc1dc
488 changed files with 27306 additions and 19063 deletions
@@ -71,7 +71,7 @@ Versioned, timestamped files with `up`/`down`. Two authoring modes:
last applied state and emits the SQL for you to review.
`wrnexus db migrate` applies pending migrations inside a transaction and records
them in a `_wire_migrations` table; `rollback` runs `down`; `status` lists state.
them in a `_wrn_migrations` table; `rollback` runs `down`; `status` lists state.
Dialect-aware SQL generation for create/alter/index.
## 5. sqlc-like typed queries (`app/db/queries/*.sql` → generated TS)
@@ -130,7 +130,7 @@ A local Artifact/web UI to browse tables + run read-only queries in dev.
1. **Core + SQLite adapter**`@wrnexus/db`, `table()`/`v` model layer, `Driver`
interface, `bun:sqlite` adapter, `db.one/all/exec/tx`, result→schema mapping.
(SQLite first = zero external service to test against.)
2. **Migrations** ✅ done — runner + `_wire_migrations`, `wrnexus db migrate/rollback/status/new`,
2. **Migrations** ✅ done — runner + `_wrn_migrations`, `wrnexus db migrate/rollback/status/new`,
`.sql` (`-- +up`/`-- +down`) + `--from-models` DDL generation. (Model-diffing beyond the
initial CREATE TABLE is a later enhancement; needs topological ordering by FK refs.)
3. **sqlc-like generator** ✅ done — `.sql` parsing (`-- name: X :one/:many/:exec`),
@@ -144,7 +144,7 @@ A local Artifact/web UI to browse tables + run read-only queries in dev.
5. **MongoDB adapter** ✅ built (unverified) — `@wrnexus/db/mongo`: a document
collection API (`find/findOne/insert/update/delete/count`) keyed by models, reads
coerced through `model.parse`, `_id``id`. Lazily imports `mongodb` (optional dep).
Not wired into the SQL singleton/migrations/generator (Mongo isn't SQL). Needs
Not connected into the SQL singleton/migrations/generator (Mongo isn't SQL). Needs
`mongodb` + a server to test.
6. **Polish** — ✅ FK-topological ordering in `--from-models` (referenced tables
first). Deferred: `db studio` (web UI), richer relations/joins helpers.