2.6 KiB
2.6 KiB
3002/3003 Schema Separation Status
Date: 2026-05-17
Status: ✅ Pipeline tables created in public; schema incompatibilities remain
Summary
| Schema | Has pipeline tables | Has auth tables | Used by |
|---|---|---|---|
public |
✅ (newly created) | ✅ (original) | 3002 (production) — currently using dev as workaround |
dev |
✅ (full, working) | ✅ (synced) | 3003 (playground) |
What Was Done
Pipeline tables created in public schema (11 tables)
videos,chunk,chunk_vectors,cuts,framesmonitor_jobs,processor_results,processor_versionsparent_chunks,tkg_edges,tkg_nodes
All include proper sequences, indexes, and constraints matching the dev schema.
Remaining Blockers
Schema incompatibilities between dev and public
| Table | dev cols | public cols | Status |
|---|---|---|---|
| identities | 17 | 16 | ⚠️ Different columns (e.g. name vs real_name/actor_name) |
| face_detections | 16 | 17 | ⚠️ Column count mismatch |
| identity_bindings | 7 | 8 | ⚠️ Column count mismatch |
| person_identities | 16 | 15 | ⚠️ Column count mismatch |
| pre_chunks | 19 | 10 | ⚠️ Significantly different |
| api_keys | 19 | 19 | ✅ Match |
| resources | 9 | 9 | ✅ Match |
| users | 8 | 8 | ✅ Match |
Identities table key differences
public.identitiesusesreal_name+actor_name(old schema)dev.identitiesusesname(new unified schema)dev.identitieshastmdb_poster,file_uuid,face_embedding,voice_embedding,identity_embeddingpublic.identitiesonly hasface_embedding,voice_embedding(noidentity_embedding)
Options
Option A: Full data migration (recommended for later)
- Dump data from old public tables
- Drop old public tables
- Recreate from dev schema DDL
- Migrate data with column mapping
- Switch 3002 to
DATABASE_SCHEMA=public
Option B: Keep current workaround (simplest for now)
- 3002 continues with
DATABASE_SCHEMA=dev - 3003 uses
DATABASE_SCHEMA=dev - Both share the same schema, but have separate Redis key prefixes + ports
Option C: Rename dev → public (requires downtime)
- Stop all services
- Rename
devschema to something else - Rename
publictopublic_old - Rename
devtopublic - Update references
Current Status
✅ Pipeline tables exist in both schemas
✅ auth tables (users, sessions, jwt_blacklist) exist in both
✅ Redis key prefixes separate (momentry: vs momentry_dev:)
⚠️ 3002 still uses DATABASE_SCHEMA=dev workaround
⛔ Shared tables need migration before 3002 can use public schema