mirror of
https://github.com/fleetdm/fleet
synced 2026-05-13 03:59:14 +00:00
For #26478 ## Details This PR updates the db snapshot script to have it add a `drop database if exists` line to the top. This means that snapshots will start from a clean state, so that they won't get out of sync with migrations. ## Testing I tested this by: 1. starting with an up-to-date database, restoring an old snapshot while on the main code branch, then trying `fleet prepare db`. 2. This failed because the migrations it tried to run were creating tables that already existed in the database. 3. I made a new copy of this snapshot by dropping my db and doing `create database fleet`, restoring the snapshot and snapshotting again. 4. On the main branch, I reset my db using `make db-reset` and then restore my new snapshot 5. Finally, did `fleet prepare db` and this time it worked since the new snapshot dropped the database before restoring. |
||
|---|---|---|
| .. | ||
| backup.sh | ||
| README.md | ||
| restore.sh | ||
| restore_e2e_software_test.sh | ||