diff --git a/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_add_owner_to_placeholder.py b/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py similarity index 97% rename from ereuse_devicehub/migrations/versions/d7ea9a3b2da1_add_owner_to_placeholder.py rename to ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py index fca1d0c0..c8a80e5a 100644 --- a/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_add_owner_to_placeholder.py +++ b/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py @@ -10,8 +10,8 @@ from alembic import context, op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. -revision = 'd7ea9a3b2da1' -down_revision = '2b90b41a556a' +revision = '2b90b41a556a' +down_revision = '3e3a67f62972' branch_labels = None depends_on = None diff --git a/ereuse_devicehub/migrations/versions/2b90b41a556a_create_placeholders.py b/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py similarity index 97% rename from ereuse_devicehub/migrations/versions/2b90b41a556a_create_placeholders.py rename to ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py index 8c4915dc..9e4a9dbe 100644 --- a/ereuse_devicehub/migrations/versions/2b90b41a556a_create_placeholders.py +++ b/ereuse_devicehub/migrations/versions/d7ea9a3b2da1_create_placeholders.py @@ -32,8 +32,8 @@ from ereuse_devicehub.resources.device.models import Computer, Device, Placehold from ereuse_devicehub.resources.lot.models import LotDevice # revision identifiers, used by Alembic. -revision = '2b90b41a556a' -down_revision = '3e3a67f62972' +revision = 'd7ea9a3b2da1' +down_revision = '2b90b41a556a' branch_labels = None depends_on = None @@ -76,7 +76,7 @@ def clone_device(device): new_c = clone_device(c) new_c.parent = new_device - placeholder = Placeholder(device=new_device, binding=device) + placeholder = Placeholder(device=new_device, binding=device, is_abstract=True, owner_id=device.owner_id) db.session.add(placeholder) tags = [x for x in device.tags]