@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.
- package/README.md +15 -0
- 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