habitmove/loop/migration.py

11 lines
225 B
Python
Raw Normal View History

2021-08-28 07:54:41 +00:00
import loop.tables as tables
import loop.habits as habits
2021-08-27 08:55:31 +00:00
def migrate(trackers, events):
2021-08-28 07:54:41 +00:00
db = tables.migrate("output.db")
2021-08-27 08:55:31 +00:00
if trackers is not None:
2021-08-28 07:54:41 +00:00
habits.migrate(db, trackers)
2021-08-27 08:55:31 +00:00
db.commit()
2021-08-27 21:33:21 +00:00
db.close()