init db
This commit is contained in:
parent
e311b481c3
commit
5d7f38d8b8
3
app.py
3
app.py
@ -1511,6 +1511,8 @@ def init_db() -> None:
|
||||
db.execute("ALTER TABLE user_settings ADD COLUMN name_color TEXT")
|
||||
if not column_exists(db, "presence_events", "direct_conversation_id"):
|
||||
db.execute("ALTER TABLE presence_events ADD COLUMN direct_conversation_id INTEGER")
|
||||
if not column_exists(db, "user_profiles", "badge_text"):
|
||||
db.execute("ALTER TABLE user_profiles ADD COLUMN badge_text TEXT")
|
||||
|
||||
db.execute("CREATE INDEX IF NOT EXISTS idx_messages_room_id_id ON messages(room_id, id)")
|
||||
db.execute("CREATE INDEX IF NOT EXISTS idx_messages_channel_id_id ON messages(channel_id, id)")
|
||||
@ -1764,7 +1766,6 @@ def init_db() -> None:
|
||||
|
||||
db.commit()
|
||||
|
||||
|
||||
def bootstrap_admin() -> None:
|
||||
username = normalize_username(os.environ.get("ADMIN_USERNAME", ""))
|
||||
password = os.environ.get("ADMIN_PASSWORD", "")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user