This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2020-04-17 12:33:50 +00:00
|
|
|
"""${message}
|
|
|
|
|
|
|
|
Revision ID: ${up_revision}
|
|
|
|
Revises: ${down_revision | comma,n}
|
|
|
|
Create Date: ${create_date}
|
|
|
|
|
|
|
|
"""
|
2023-08-02 15:16:55 +00:00
|
|
|
from alembic import op, context
|
2020-04-17 12:33:50 +00:00
|
|
|
import sqlalchemy as sa
|
2020-05-11 08:07:23 +00:00
|
|
|
import sqlalchemy_utils
|
|
|
|
import citext
|
2023-03-21 16:31:43 +00:00
|
|
|
from ereuse_devicehub import teal
|
2020-04-17 12:33:50 +00:00
|
|
|
${imports if imports else ""}
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = ${repr(up_revision)}
|
|
|
|
down_revision = ${repr(down_revision)}
|
|
|
|
branch_labels = ${repr(branch_labels)}
|
|
|
|
depends_on = ${repr(depends_on)}
|
|
|
|
|
|
|
|
|
2020-05-22 16:43:01 +00:00
|
|
|
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
|
|
|
|
|
2020-04-17 12:33:50 +00:00
|
|
|
def upgrade():
|
|
|
|
${upgrades if upgrades else "pass"}
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
${downgrades if downgrades else "pass"}
|