migration script

This commit is contained in:
Cayo Puigdefabregas 2020-11-04 17:31:14 +01:00
parent ed93fa7b29
commit 8145e606db

View file

@ -1,6 +1,8 @@
from ereuse_devicehub.resources.device import models as m
from ereuse_devicehub.db import db
from ereuse_devicehub.resources.device import models as m
[x.owner_id for x in m.Device.query.filter((m.Computer.id == m.Device.id)).all()]
def migrate(app):
with app.app_context():
for c in m.Component.query.filter():