[Eva] Ева, прочитай .gitignore #36

Merged
Drobysh merged 7 commits from eva/chat-c3088d-backend into main 2026-10-13 12:02:29 +00:00
Showing only changes of commit f78a1fa19f - Show all commits
+11
View File
@@ -1299,6 +1299,17 @@ async def init_db():
""")
logger.info("Added apple_id column to users (Pleily)")
# difficulty
col_exists = await conn.fetchval("""
SELECT 1 FROM information_schema.columns
WHERE table_name = 'users' AND column_name = 'difficulty'
""")
if not col_exists:
await conn.execute("""
ALTER TABLE users ADD COLUMN difficulty TEXT DEFAULT 'medium'
""")
logger.info("Added difficulty column to users (Pleily)")
# app_user_id_seq — sequence для отрицательных user_id
await conn.execute("""
CREATE SEQUENCE IF NOT EXISTS app_user_id_seq