Phase 2 of Migration
This commit is contained in:
@@ -466,8 +466,8 @@ backend/
|
||||
| Phase | Description | Status |
|
||||
|-------|-------------|--------|
|
||||
| 0 | Schema foundation (all tables in Postgres) | **COMPLETE** — applied on VPS 2026-04-17 |
|
||||
| 1 | SQLite → Postgres (data migration) | **IN PROGRESS** — scripts written, not yet run |
|
||||
| 2 | Firestore → Postgres (data migration) | NOT STARTED |
|
||||
| 1 | SQLite → Postgres (data migration) | **COMPLETE** — all 12 scripts ran successfully on VPS 2026-04-17 |
|
||||
| 2 | Firestore → Postgres (data migration) | **IN PROGRESS** — scripts written, not yet run |
|
||||
| 3 | Staff auth cutover | NOT STARTED |
|
||||
| 4 | Audit log system | NOT STARTED |
|
||||
| 5 | MQTT live data cutover | NOT STARTED |
|
||||
@@ -523,3 +523,26 @@ After all scripts complete, verify the run log:
|
||||
docker compose exec postgres psql -U bellsystems_user -d bellsystems_db \
|
||||
-c "SELECT script_name, ran_at, source_rows, dest_rows, success FROM _migration_runs ORDER BY ran_at;"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Phase 2 — Run Order & Commands
|
||||
|
||||
crm_customers MUST run before crm_orders (FK dependency).
|
||||
|
||||
```bash
|
||||
# 2.1
|
||||
docker compose exec backend python -m migration.migrate_settings
|
||||
|
||||
# 2.2
|
||||
docker compose exec backend python -m migration.migrate_public_features
|
||||
|
||||
# 2.3
|
||||
docker compose exec backend python -m migration.migrate_crm_products
|
||||
|
||||
# 2.4 (required before 2.5)
|
||||
docker compose exec backend python -m migration.migrate_crm_customers
|
||||
|
||||
# 2.5 (depends on 2.4)
|
||||
docker compose exec backend python -m migration.migrate_crm_orders
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user