def createFlavors(db):
    cu = db.cursor()
    commit = False
    if "Flavors" not in db.tables:
        cu.execute("""
        CREATE TABLE Flavors(
            flavorId        %(PRIMARYKEY)s,
            flavor          %(STRING)s
        ) %(TABLEOPTS)s""" * db.keywords)
        cu.execute("INSERT INTO Flavors (flavorId, flavor) VALUES (0, '')")
        db.tables["Flavors"] = []
        commit = True
    db.createIndex("Flavors", "FlavorsFlavorIdx", "flavor", unique = True)

    if "FlavorMap" not in db.tables:
        cu.execute("""
        CREATE TABLE FlavorMap(
            flavorId        INTEGER NOT NULL,
            base            VARCHAR(254) NOT NULL,
            sense           INTEGER,
            depClass        INTEGER NOT NULL,
            flag            VARCHAR(254),
            CONSTRAINT FlavorMap_flavorId_fk
                FOREIGN KEY (flavorId) REFERENCES Flavors(flavorId)
                ON DELETE CASCADE ON UPDATE CASCADE
        ) %(TABLEOPTS)s""" % db.keywords)
        db.tables["FlavorMap"] = []
        commit = True
    db.createIndex("FlavorMap", "FlavorMapIndex", "flavorId, depClass, base")

    if "FlavorScores" not in db.tables:
        from conary.deps import deps
        cu.execute("""
        CREATE TABLE FlavorScores(
            request         INTEGER,
            present         INTEGER,
            value           INTEGER NOT NULL DEFAULT -1000000
        )  %(TABLEOPTS)s""" % db.keywords)
        db.tables["FlavorScores"] = []
        for (request, present), value in deps.flavorScores.iteritems():
            if value is None:
                value = -1000000
            cu.execute("INSERT INTO FlavorScores (request, present, value) VALUES (?,?,?)",
                       (request, present, value))
        commit = True
    db.createIndex("FlavorScores", "FlavorScoresIdx", "request, present", unique = True)
    if commit:
        db.loadSchema()
dataset/ETHPy150Open sassoftware/conary/conary/server/schema.py/createFlavors/operator `%` -> `*`