feat(cloud-store): add Alembic baseline migration

This commit is contained in:
2026-07-12 16:55:46 +08:00
parent 64aa9b39bc
commit 24d9dbf38b
10 changed files with 328 additions and 2 deletions
@@ -11,7 +11,7 @@
- [x] 2.1 Define the cloud repository contract for hosts, device snapshots, plugins, tasks, attempts, leases, reservations, and transactional assignment operations.
- [x] 2.2 Implement SQLAlchemy models and a repository adapter that preserves existing `CloudStore` observable behavior.
- [x] 2.3 Add PostgreSQL and SQLite database URL support with engine/session lifecycle owned by the cloud application.
- [ ] 2.4 Add Alembic configuration and a baseline migration that preserves existing host, device, task, and plugin data while adding lease/attempt/result fields.
- [x] 2.4 Add Alembic configuration and a baseline migration that preserves existing host, device, task, and plugin data while adding lease/attempt/result fields.
- [ ] 2.5 Add forward/downgrade migration tests and schema-version readiness checks.
- [ ] 2.6 Run repository contract tests against SQLite and PostgreSQL, including rollback and process-restart cases.