habitmove/loop/habit_migrator.py

19 lines
447 B
Python

def create_habits(db, trackers):
print("migrating habits, yo")
c = db.cursor()
tracker = trackers["cigarette"]
print(tracker)
# for when the execute works, can be filled in its own function
habit = (
tracker["label"],
0,
0,
tracker["id"],
)
c.execute(
"""INSERT INTO
Habits(id, name, position, type, uuid)
VALUES (NULL, ?, ?, ?, ?)""",
habit,
)