Reset the test or demo database
SOP SYS-07 · Technical systems manual
1 Purpose
Rebuild the test database, or the shop’s database (which the Technical workbench calls the demo database), from the files in sql/, so it holds the latest rules and a fresh set of made-up dogs.
2 Applies to
The person responsible for the shop’s database, after pulling changes to sql/, or to undo what was recorded while trying the app out.
3 Before you begin
- The shop’s app is running. See SYS-03 Start, stop and check the shop’s app.
- Know which database you mean:
| Database | Used by | Holds |
|---|---|---|
grooming_test |
The database tests (SYS-04) and the Technical workbench | Made-up test dogs from sql/seed/fixture.sql, and any AI runs loaded with the Technical workbench |
grooming_demo |
The shop’s screens at http://localhost:3000 | Demo dogs from sql/seed/demo.sql, and everything recorded in the shop’s screens since |
Every client, booking, haircut, allergy and copy of paperwork entered in the shop’s screens since the last rebuild is deleted. Rebuild it only to start over on purpose. Make a backup first; see SYS-08 Back up and restore the shop’s data.
4 Procedure
Open the Technical workbench at http://localhost:8501.
In the left menu, click Run & test.
Click the Database tab.
Choose the database:
- The test database: click Reset the database…, then Yes, reset it.
- The demo database: click Reset the demo database…, then Yes, rebuild the demo.
The output appears below. Wait until it finishes.
If you reset the test database and had loaded AI runs into it, load them again: on the Scoring tab, choose each run and click Load into the database. The runs are kept on disk and are not lost by a reset.
If you reset the test database, run the tests. See SYS-04 Run the database tests.
5 Result
The database holds the latest rules from sql/ and a fresh set of made-up dogs. The other database is not touched.