@dapplelight/signet-db 0.3.1 → 0.3.2

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 +15 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -189,6 +189,21 @@ Flags `DROP TABLE`, `DROP COLUMN`, renames, and `NOT NULL` added without a
189
189
  not flagged. Accept a finding with `-- signet-allow: drop-column` (or `all`)
190
190
  in the statement. `checkMigrationSql(sql, file)` is the same check as a function.
191
191
 
192
+ ## Migrations after an update
193
+
194
+ An update to this package can add a column to its tables. Your database gets it
195
+ only from a migration you generate and commit (`drizzle-kit generate`). Your
196
+ tests may not notice, and SQLite may not either: it can read a missing column
197
+ back as its own name, then fail on the next write. Fail CI instead:
198
+
199
+ ```yaml
200
+ - run: bunx drizzle-kit generate 2>&1 | tee db-generate.log && grep "No schema changes" db-generate.log
201
+ ```
202
+
203
+ Match the message, not only the exit code: when drizzle-kit has to ask about a
204
+ rename, it exits 0 in CI and writes nothing. Apps from `create-signet-app` have
205
+ this step; add it to an app scaffolded earlier.
206
+
192
207
  ## Seed data
193
208
 
194
209
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dapplelight/signet-db",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "license": "MIT",
5
5
  "description": "Drizzle helpers: sortable ids, money, encrypted fields, per-user scoping, audit trail, migration checks.",
6
6
  "keywords": [