generated from john/python-template
1.1 KiB
1.1 KiB
ADR-0002: Explicit schema bootstrap policy
- Status: accepted
- Date: 2026-06-25
Context
MVP called schema bootstrap (create_all) on every startup. REQ-10 requires explicit, opt-in schema bootstrap behavior so normal production startup does not mutate schema.
Decision
Add environment-aware bootstrap policy:
- New settings:
environment:development|test|productionbootstrap_schema_on_startup: optional explicit override
- Default behavior:
- Development/test: bootstrap enabled
- Production: bootstrap disabled
- App startup calls
create_allonly when policy evaluates true.
Consequences
Positive
- Production startup behavior is safer and policy-driven.
- Local development remains simple by default.
Tradeoffs
- Deployments now require explicit schema management in production.
Alternatives Considered
- Always bootstrap in all environments
- Rejected: violates
REQ-10intent.
- Rejected: violates
- Disable bootstrap everywhere immediately
- Rejected: hurts local developer workflow without migration tool replacement yet.