Summary
Schema changes can start with incompatible data and fail halfway through a deployment.
Why this matters
This closes a correctness, security, or operability gap in the Liquifact backend and makes the behavior explicit, observable, and safe under failure.
Requirements
- Repository scope: Liquifact/Liquifact-backend only.
- Inspect counts and invariants before migration; fail without writes when preconditions are not met; emit a redacted report suitable for operators.
- Preserve tenant isolation, structured errors, and existing API compatibility unless the issue explicitly requires a contract change.
- Add focused unit and integration coverage for the new behavior.
Technical guidance
- Follow the repository's existing middleware, service, persistence, logging, and error-envelope conventions.
- Keep side effects bounded and make retries, authorization, and failure handling explicit.
- Document non-obvious tradeoffs and include security notes in the PR.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- automatic destructive cleanup
Summary
Schema changes can start with incompatible data and fail halfway through a deployment.
Why this matters
This closes a correctness, security, or operability gap in the Liquifact backend and makes the behavior explicit, observable, and safe under failure.
Requirements
Technical guidance
Edge cases — each must have a test
Acceptance criteria
Out of scope