- migrations 0002-0012 split by domain (foundation/instances/content/identity/ sources/assets/policy/execution/agent/ops/organization): 41 tables, uuid pk, created_at/updated_at + touch trigger, text+CHECK status sets, pgcrypto/pg_trgm - key constraints: source_release(site_id, site_release_id), observation(feed_id, guid), external_identity accepted partial unique, download_task(instance_id, torrent_hash), one active acquisition_plan per slot, one active path_binding per entity/season, asset_location root+path uniqueness, organization_record change_seq/change_xid cursor - secret table (ciphertext/nonce/kdf) + secret_ref columns; outbox dispatch fields (ADR-002) - src/types.ts generated from the migrated schema (scripts/gen-types.ts), drift-checked in tests; int8 -> number, date -> string parsers; migrator accepts migrationTableSchema - contracts: Row/Create/Update schemas per domain, public organization-record API (changeSeq cursor), GlobalSettings, CapabilityDescriptor + 14 capability IO schemas, typed SSE events, Api endpoint table - tests: migration up/down round trip on real PG in an isolated schema, constraint checks, contracts<->db column/enum sync, positive/negative parse for every exported schema Co-Authored-By: Claude Fable 5.1 <[email protected]>
24 lines
576 B
JSON
24 lines
576 B
JSON
{
|
|
"name": "@umt/db",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/index.ts"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc -p tsconfig.json",
|
|
"test": "vitest run",
|
|
"migrate": "tsx --env-file-if-exists=../../.env scripts/migrate.ts latest",
|
|
"reset": "tsx --env-file-if-exists=../../.env scripts/migrate.ts reset",
|
|
"gen:types": "tsx --env-file-if-exists=../../.env scripts/gen-types.ts"
|
|
},
|
|
"dependencies": {
|
|
"kysely": "^0.29.6",
|
|
"pg": "^8.23.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/pg": "^8.23.1"
|
|
}
|
|
}
|