fix: add missing columns to city_rooms table (room_type, owner_type, etc.)

This commit is contained in:
Apple
2025-11-30 09:49:55 -08:00
parent a1baedfc94
commit f8d1287e38

View File

@@ -41,6 +41,17 @@ async def run_migrations():
""")
logger.info("Migration: Added room_role, is_public, sort_order to city_rooms table.")
# ROOMS_LAYER_RESTORE: Add owner_type, owner_id, space_scope, visibility, room_type
await conn.execute("""
ALTER TABLE city_rooms
ADD COLUMN IF NOT EXISTS room_type TEXT DEFAULT 'chat',
ADD COLUMN IF NOT EXISTS owner_type TEXT DEFAULT 'city',
ADD COLUMN IF NOT EXISTS owner_id TEXT,
ADD COLUMN IF NOT EXISTS space_scope TEXT DEFAULT 'city',
ADD COLUMN IF NOT EXISTS visibility TEXT DEFAULT 'public-city';
""")
logger.info("Migration: Added room_type, owner_type, owner_id, space_scope, visibility to city_rooms table.")
# TASK C2: Create nodes table with owner_microdao (replaces node_cache for ontology)
await conn.execute("""
CREATE TABLE IF NOT EXISTS nodes (