Skip to content
Snippets Groups Projects
Commit b117f672 authored by Daniel Wagner-Hall's avatar Daniel Wagner-Hall
Browse files

Merge pull request #633 from matrix-org/daniel/ick

Idempotent-ise schema update script
parents c00f4e48 3b97797c
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,11 @@ logger = logging.getLogger(__name__)
def run_upgrade(cur, database_engine, config, *args, **kwargs):
# NULL indicates user was not registered by an appservice.
cur.execute("ALTER TABLE users ADD COLUMN appservice_id TEXT")
try:
cur.execute("ALTER TABLE users ADD COLUMN appservice_id TEXT")
except:
# Maybe we already added the column? Hope so...
pass
cur.execute("SELECT name FROM users")
rows = cur.fetchall()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment