refactor(cloud-store): adopt SQLAlchemy adapter

This commit is contained in:
2026-07-12 16:51:03 +08:00
parent ae29477f6a
commit 05a5f0bfa7
6 changed files with 408 additions and 405 deletions
@@ -9,7 +9,7 @@
## 2. Repository Contract And Migrations
- [x] 2.1 Define the cloud repository contract for hosts, device snapshots, plugins, tasks, attempts, leases, reservations, and transactional assignment operations.
- [ ] 2.2 Implement SQLAlchemy models and a repository adapter that preserves existing `CloudStore` observable behavior.
- [x] 2.2 Implement SQLAlchemy models and a repository adapter that preserves existing `CloudStore` observable behavior.
- [ ] 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.
- [ ] 2.5 Add forward/downgrade migration tests and schema-version readiness checks.