@keelward/cli
v0.2.0
Published
Introspect, drift and migration tooling for Keelward on Postgres.
Maintainers
Readme
@keelward/cli
Postgres tooling for Keelward. Install it as a dev dependency; it never belongs in an application bundle.
npm install -D @keelward/clikeelward introspect # existing database -> db/schema.ts
keelward migrate new <name> # timestamped .sql file you write yourself
keelward migrate up # apply pending, one transaction per file
keelward drift # fail in CI when schema and database disagree
keelward check # unindexed foreign keys, missing tokens, loose tsconfigConnection comes from --url or $DATABASE_URL. Paths come from flags or
keelward.config.json.
There is no automatic migration diffing, on purpose: you write the SQL, because you
know whether that column needs backfilling first. drift guarantees the schema and
the database never separate without CI saying so.
MIT
