matrix-rssbot/migrations/migration_8.py
Kumi cfeaae3fac
Add an AI generated logo
Set logo as room/space avatar
Stay admin when creating a room
Add a settings table to the database
2023-05-09 11:30:51 +00:00

22 lines
No EOL
520 B
Python

# Migration to add settings table
from datetime import datetime
def migration(conn):
with conn.cursor() as cursor:
cursor.execute(
"""
CREATE TABLE IF NOT EXISTS settings (
setting TEXT NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (setting)
)
"""
)
cursor.execute(
"INSERT INTO migrations (id, timestamp) VALUES (8, ?)",
(datetime.now(),)
)
conn.commit()