@zincapp/znvault-cli 4.15.0 → 4.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -231,6 +231,36 @@ znvault superadmin backup storage show
231
231
  znvault superadmin backup storage set-s3 --bucket my-bucket --region us-east-1
232
232
  ```
233
233
 
234
+ ### Schema Migrations
235
+
236
+ Run schema migrations against a database through a short-lived dynamic-secrets lease.
237
+ `apply` mints a lease, connects to MySQL, runs pending migrations, and **always** revokes
238
+ the lease when done (even on failure); `status` is read-only.
239
+
240
+ ```bash
241
+ znvault migration apply <config.json> # Apply pending migrations per phase
242
+ znvault migration status <config.json> # Read-only: pending/applied/reconcile counts
243
+ ```
244
+
245
+ The `<config.json>` argument is a **MigrationConfig** — either a single object or an array of
246
+ phase objects (applied in order):
247
+
248
+ ```json
249
+ {
250
+ "engine": "mysql",
251
+ "roleId": "dbr_...",
252
+ "migrationsDir": "/abs/or/rel/migrations",
253
+ "database": "optional",
254
+ "scaffoldingFile": "optional"
255
+ }
256
+ ```
257
+
258
+ - **MySQL only.** An `"engine": "postgres"` config is rejected at validation before any lease
259
+ is minted (PostgreSQL support is deferred).
260
+ - **Lease model.** The lease is minted from the dynamic-secrets role named by `roleId`, so the
261
+ active profile must be authenticated with access to that role. The lease is always revoked
262
+ on exit.
263
+
234
264
  ### Audit & Security
235
265
 
236
266
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zincapp/znvault-cli",
3
- "version": "4.15.0",
3
+ "version": "4.15.1",
4
4
  "description": "Official CLI for ZnVault administration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",