15 Complete the application lifecycle
In a fresh example directory, generate and source .env, then run: Revision0001 creates the original jobs table. Revision0002 adds operation and creation-time columns, persistent credentials, users, counters and budget reservations.
- Initialize through migrations
- Separate schema ownership from runtime privileges
- Human login and service credentials
- Shared quotas, schedules and webhooks
- Cancellation, retries and retention
- Acceptance criteria
Files: advanced.py, operator_cli.py, migrations/, tests/test_v3.py, tests/test_extended.py. These additions turn several earlier design exercises into executable examples. They remain a teaching service with deliberately bounded scope. In a fresh example directory, generate and source .env, then run: Revision0001 creates the original jobs table. Revision0002 adds operation and creation-time columns, persistent credentials, users, counters and budget reservations. The migration registers every model before comparing metadata. A fresh-process regression test catches missing registration that an already-imported test process could hide. For an existing v2 database, first take and restore a backup and compare its actual schema to revision0001. Stop API writers and workers during this teaching migration.