def createIdTables(db):
    commit = False
    cu = db.cursor()
    if idtable.createIdTable(db, "Branches", "branchId", "branch"):
        cu.execute("INSERT INTO Branches (branchId, branch) VALUES (0, NULL)")
        commit = True
    if idtable.createIdTable(db, "Labels", "labelId", "label"):
        cu.execute("INSERT INTO Labels (labelId, label) VALUES (0, 'ALL')")
        commit = True
    if idtable.createIdTable(db, "Versions", "versionId", "version"):
        cu.execute("INSERT INTO Versions (versionId, version) VALUES (0, NULL)")
        commit = True
    if "Items" not in db.tables:
        cu.execute("""
        CREATE TABLE Items(
            itemId      %(PRIMARYKEY)s,
            item        VARCHAR(254),
            hasTrove    INTEGER NOT NULL DEFAULT 0
        ) %(TABLEOPTS)s""" % db.keywords)
        db.tables["Items"] = []
        cu.execute("INSERT INTO Items (itemId, item) VALUES (0, 'ALL')")
        commit = True
    commit |= db.createIndex("Items", "Items_uq", "item", unique = True)
    if commit:
        db.loadSchema()


# cached access map for (userGroupId, instanceId)
dataset/ETHPy150Open sassoftware/conary/conary/server/schema.py/createIdTables/original