* feat(db): install into a configurable PostgreSQL schema
Add DB_SCHEMA (and dbOptions.schema / createDatabase({ schema }) /
runMigrations(db, { schema })) so notifkit can live in a schema other than
public. Defaults to public, where behaviour is unchanged.
For a custom schema, runMigrations creates the schema, retargets the
bundled migrations at it (rewrites the "public". qualifiers drizzle-kit
emits and sets search_path for the unqualified objects with SET LOCAL,
inside the migration transaction), refuses any migration that still
mentions public afterwards, and keeps the drizzle journal in the same
schema. Afterwards it checks via information_schema that every table of
the package's Drizzle schema exists in the target schema and throws with
the names of any that are missing. createDatabase sets search_path on
every connection.
Add a notifkit-migrate bin (next to notifkit-create-admin) that reads
DATABASE_URL and DB_SCHEMA, applies the migrations, closes the connection
and exits non-zero on failure. The README now uses it for production
migrations instead of drizzle-kit, which ignores DB_SCHEMA, and warns
that switching an existing public install to DB_SCHEMA without moving
its tables first makes it look empty.
Closes#4
* test(db): fix typecheck and lint, move schema tests under tests/
---------
Co-authored-by: Alexander Savchenko <savchenko_av@nlmk.com>
Co-authored-by: coo1estguy <70365929+coolestcodeguy@users.noreply.github.com>
- Move Agent-operable section and AI demo higher in documentation flow
- Add Reliability & Chaos Engineering section highlighting Redis stream recovery and load testing
- Reorder quickstart and core features for improved readability
- Add .github/workflows/ci.yml with typecheck, lint, build, test, and badge publishing
- Add scripts/coverage-badge.mjs to generate shields.io endpoint JSON from coverage summary
- Update vitest.config.ts with json-summary reporter and include package sources
- Update README.md coverage badge to read from badges branch endpoint
- Ignore badge directory and ignore .next in eslint.config.js