26 June, 2026
This release reworks database seeding so that applying seed data is non-destructive and safe to re-run, and it moves the commands that touch a live database under keel db.
Non-destructive, idempotent seeding
Applying seed data no longer wipes your database first. keel db seed now leaves existing rows untouched by default and is safe to run again, so you can layer seed data on top of a running database without losing data.
keel db seedEvery seed file that Keel generates uses stable IDs and inserts that skip rows which already exist, which is what makes re-running safe.
If you want to change existing rows, use --overwrite to update them to the latest seed values. If you want a clean baseline, use --reset to rebuild the database before seeding.
keel db seed --overwrite # update existing rows to the latest seed values
keel db seed --reset # rebuild the database, then seedThe mode that ran is printed when the command finishes. See Seeding data for the full workflow.
Snapshots and scenarios
keel db snapshot captures the current state of your database into a reusable seed file. It is read-only now: it no longer resets the database before capturing, so the state you are trying to save is preserved.
Snapshots are written to seed/<name>/snapshot.sql, with the name defaulting to snapshot. You can build up data however you like through the UI, the API, or manual SQL, capture it, and recreate it later with --scenario.
keel db snapshot demo # capture into seed/demo/snapshot.sql
keel db seed --scenario demo # recreate that state laterCommand changes
The commands that write to a live database now live under keel db, and the offline commands for authoring seed files stay under keel seed.
| Before | After |
|---|---|
keel seed | keel db seed |
keel seed snapshot | keel db snapshot |
keel run --reset | keel db reset |
keel run --reset has been removed. Use keel db reset to drop and recreate your development database, then run keel run to migrate and seed it.
If a seed file still contains a TRUNCATE statement from an older Keel version, a plain keel db seed stops before running it so you do not lose data by accident. Re-run keel seed generate to update the file to the new format, or pass --reset to apply it against a rebuilt database.
Fixes and Improvements
- CLI:
keel testnow starts faster.
For any issues or feedback, please contact us at help@keel.so.
Thank you for using Keel!