Repository navigation
Seeding the Local database
Rodrigo Silveira edited this page Jul 6, 2026
·
3 revisions
This is a local development/manual testing utility that lets you reset backend/data/app.db and load realistic operational data without depending on E2E-created synthetic records.
This is a link to a description of how to reset the local database, now deprecated by this page's content.
Makefile
scripts/seed-manual-testdata.py
make manual-testdata-local-reset
make manual-testdata-local-seed
make manual-testdata-local-reset-no-work-periodsmake manual-testdata-local-reset
python3 scripts/verify-manual-testdata.pyThis script will:
- Deletes backend/data/app.db
- Runs all migrations
- Seeds the manual-test dataset
make manual-testdata-local-seedmake manual-testdata-local-reset-no-work-periodsThe script uses stable manual-* IDs and deletes/replaces only previous manual seed rows, so it is safe to rerun for local development. It does not delete E2E ers-testdata-* rows unless you reset the database first.
The seed dataset includes:
Cantina/Canteen price-list items
Sectors
Locations
Tasks
Mines: North, South
Periods: Day, Night
Availability: A, D, L
70 total
40 Active
25 Inactive
5 Deactivated
40 total
Journey dates between today and the prior 90 days
16 commission earners
16 daily wage earners
8 salary earners
14 recent Work Periods
12 posted/with accruals
2 pending input / waiting for gold production
Two wells/mines
Around 38g per well per day
80 expense records
15 PIX ledger remittance records
Ledger entries
Receipt lifecycle samples
Gold prices
Posted accrual runs/items
Important domain note: the script keeps PIX as current-account ledger remittance transactions, not normal expense-category rows.