From f148a42da1db9f6da1b650299f7947ff26413284 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 3 Mar 2021 10:39:40 +0100 Subject: [PATCH] base of migration --- .../8cb91ad1cc40_add_code_to_device.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ereuse_devicehub/migrations/versions/8cb91ad1cc40_add_code_to_device.py diff --git a/ereuse_devicehub/migrations/versions/8cb91ad1cc40_add_code_to_device.py b/ereuse_devicehub/migrations/versions/8cb91ad1cc40_add_code_to_device.py new file mode 100644 index 00000000..bf49f056 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/8cb91ad1cc40_add_code_to_device.py @@ -0,0 +1,33 @@ +"""add code to device + +Revision ID: 8cb91ad1cc40 +Revises: eca457d8b2a4 +Create Date: 2021-03-03 10:39:19.331027 + +""" +from alembic import op +import sqlalchemy as sa +import sqlalchemy_utils +import citext +import teal + + +# revision identifiers, used by Alembic. +revision = '8cb91ad1cc40' +down_revision = 'eca457d8b2a4' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + +def upgrade(): + pass + + +def downgrade(): + pass