Skip to content
Snippets Groups Projects
Verified Commit 4817665e authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

add database migration

parent 58d7c2d2
No related branches found
No related tags found
1 merge request!129Add workflow for TWAMP deployment
This commit is part of merge request !129. Comments created here will be created in the context of that merge request.
"""Add TWAMP deployment workflow.
Revision ID: f0764c6f392c
Revises: 815033570ad7
Create Date: 2023-12-27 14:31:42.285180
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'f0764c6f392c'
down_revision = '815033570ad7'
branch_labels = None
depends_on = None
from orchestrator.migrations.helpers import create_workflow, delete_workflow
new_workflows = [
{
"name": "deploy_twamp",
"target": "MODIFY",
"description": "Deploy TWAMP",
"product_type": "Iptrunk"
}
]
def upgrade() -> None:
conn = op.get_bind()
for workflow in new_workflows:
create_workflow(conn, workflow)
def downgrade() -> None:
conn = op.get_bind()
for workflow in new_workflows:
delete_workflow(conn, workflow["name"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment