fix: add updated_at column to city_rooms

This commit is contained in:
Apple
2025-11-30 09:51:03 -08:00
parent f8d1287e38
commit b2ddaa90b3

View File

@@ -41,16 +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
# ROOMS_LAYER_RESTORE: Add owner_type, owner_id, space_scope, visibility, room_type, updated_at
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';
ADD COLUMN IF NOT EXISTS visibility TEXT DEFAULT 'public-city',
ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ DEFAULT NOW();
""")
logger.info("Migration: Added room_type, owner_type, owner_id, space_scope, visibility to city_rooms table.")
logger.info("Migration: Added room_type, owner_type, owner_id, space_scope, visibility, updated_at to city_rooms table.")
# TASK C2: Create nodes table with owner_microdao (replaces node_cache for ontology)
await conn.execute("""