add markup metadata to sig; reparse sigs on init
This commit is contained in:
@@ -5,12 +5,17 @@ def migrate_old_avatars():
|
||||
new_path = f"/static{avatar['file_path']}"
|
||||
db.execute('UPDATE avatars SET file_path = ? WHERE id = ?', new_path, avatar['id'])
|
||||
|
||||
def add_signature_format():
|
||||
db.execute('ALTER TABLE "users" ADD COLUMN "signature_markup_language" TEXT NOT NULL DEFAULT "babycode"')
|
||||
db.execute('ALTER TABLE "users" ADD COLUMN "signature_format_version" INTEGER DEFAULT NULL')
|
||||
|
||||
# format: [str|tuple(str, any...)|callable]
|
||||
MIGRATIONS = [
|
||||
migrate_old_avatars,
|
||||
'DELETE FROM sessions', # delete old lua porom sessions
|
||||
'ALTER TABLE "users" ADD COLUMN "invited_by" INTEGER REFERENCES users(id)', # invitation system
|
||||
'ALTER TABLE "post_history" ADD COLUMN "format_version" INTEGER DEFAULT NULL',
|
||||
add_signature_format,
|
||||
]
|
||||
|
||||
def run_migrations():
|
||||
|
||||
Reference in New Issue
Block a user