Skip to content
Snippets Groups Projects
Commit 8c4334e5 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Added metadata template for pims_split

parent f286948d
No related branches found
No related tags found
1 merge request!1082Added metadata template for pims_split
Pipeline #6849 passed
"""add pims_split metadata template
Revision ID: d15c553334fe
Revises: e8e6d54d8444
Create Date: 2022-09-29 13:16:59.582165
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd15c553334fe'
down_revision = 'e8e6d54d8444'
branch_labels = None
depends_on = None
metadata_template = """{"systemId": "{{request_id}}", "fileSetIds": ["{{sdmId}}", "{{calSdmId}}"], "creationTime": "{{created_at}}", "workflowName": "pims_split", "productLocator": "{{product_locator}}", "calProductLocator": "{{cal_locator}}", "destinationDirectory": "{{root_directory}}/{{relative_path}}", "token": "{{token}}", "splits": "{{#splits}}{{.}} {{/splits}}", "casaHome": "{{casaHome}}", "data_location": "{{data_location}}", "vlass_product": "{{vlass_product}}", "existing_restore": "{{existing_restore}}", "need_project_metadata": "{{need_project_metadata}}"}"""
def upgrade():
op.execute(
f"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES ('metadata.json', E'{metadata_template}', 'pims_split')
"""
)
def downgrade():
op.execute(
f"""
DELETE from workflow_templates WHERE workflow_name='pims_split' AND filename='metadata.json'
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment