This commit is contained in:
admin 2026-10-04 03:32:12 +00:00
parent af7fc6ab99
commit 00465485f1

6
app.py
View File

@ -1309,6 +1309,7 @@ def init_db() -> None:
CREATE TABLE IF NOT EXISTS user_profiles ( CREATE TABLE IF NOT EXISTS user_profiles (
user_id INTEGER PRIMARY KEY, user_id INTEGER PRIMARY KEY,
display_name TEXT, display_name TEXT,
badge_text TEXT,
bio TEXT NOT NULL DEFAULT '', bio TEXT NOT NULL DEFAULT '',
bio_mode TEXT NOT NULL DEFAULT 'txt', bio_mode TEXT NOT NULL DEFAULT 'txt',
website TEXT, website TEXT,
@ -1690,6 +1691,7 @@ def init_db() -> None:
INSERT OR IGNORE INTO user_profiles ( INSERT OR IGNORE INTO user_profiles (
user_id, user_id,
display_name, display_name,
badge_text,
bio, bio,
bio_mode, bio_mode,
website, website,
@ -1700,6 +1702,7 @@ def init_db() -> None:
id, id,
username, username,
'', '',
'',
'txt', 'txt',
'', '',
'', '',
@ -1812,12 +1815,13 @@ def bootstrap_admin() -> None:
INSERT OR IGNORE INTO user_profiles ( INSERT OR IGNORE INTO user_profiles (
user_id, user_id,
display_name, display_name,
badge_text,
bio, bio,
bio_mode, bio_mode,
website, website,
location, location,
updated_at updated_at
) VALUES (?, ?, '', 'txt', '', '', ?) ) VALUES (?, ?, '', '', 'txt', '', '', ?)
""", """,
(user_id, username, now_iso()), (user_id, username, now_iso()),
) )