def createLockTables(db):
    commit = False
    cu = db.cursor()
    if "CommitLock" not in db.tables:
        cu.execute("""
            CREATE TABLE CommitLock(
                lockId          %(PRIMARYKEY)s,
                lockName        VARCHAR(254) NOT NULL
            ) %(TABLEOPTS)s""" % db.keywords)
        db.tables["CommitLock"] = []
        cu.execute("INSERT INTO CommitLock (lockId, lockName) VALUES(0, 'ALL')")
        commit = True
    db.createIndex("CommitLock", "CommitLockName_uq", "lockName", unique=True)

    if commit:
        db.loadSchema()


# sets up temporary tables for a brand new connection
dataset/ETHPy150Open sassoftware/conary/conary/server/schema.py/createLockTables/original