Skip to content
Snippets Groups Projects
Commit a96af2a1 authored by Brittany Faciane's avatar Brittany Faciane
Browse files

Merge branch 'addCasaHomeToTemplate' into '2.8.4-DEVELOPMENT'

WS-2352: Add casa home to restore templates.

See merge request !1659
parents a81a7c97 19e36942
No related branches found
No related tags found
Loading
Pipeline #15696 passed
"""description of database changes
Revision ID: 4cd2d7009346
Revises: 96477a05695d
Create Date: 2024-05-13 09:55:18.903527
"""
from alembic import op
from pathlib import Path
# revision identifiers, used by Alembic.
revision = '4cd2d7009346'
down_revision = '96477a05695d'
branch_labels = None
depends_on = None
restore_cms_manifest_old_content = (Path.cwd() / "versions" / "templates" / "restore_cms" / "metadata_2.8.3.txt").read_text()
restore_cms_manifest_new_content = (Path.cwd() / "versions" / "templates" / "restore_cms" / "metadata_2.8.4.txt").read_text()
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{restore_cms_manifest_new_content}'
WHERE filename='metadata.json' AND workflow_name='restore_cms'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{restore_cms_manifest_old_content}'
WHERE filename='metadata.json' AND workflow_name='restore_cms'
"""
)
{"systemId": "{{request_id}}", "fileSetIds": ["{{sdmId}}", "{{calSdmId}}"], "creationTime": "{{created_at}}", "workflowName": "restore_cms", "providedFiles": "{{provided_files}}", "productLocator": "{{product_locator}}", "projectMetadata": {"title": "{{title}}", "observer": "{{observer}}", "startTime": "{{startTime}}", "telescope": "{{telescope}}", "projectCode": "{{projectCode}}"}, "calProductLocator": "{{cal_locator}}", "destinationDirectory": "{{root_directory}}/{{relative_path}}"}
\ No newline at end of file
{
"systemId": "{{request_id}}",
"fileSetIds": ["{{sdmId}}", "{{calSdmId}}"],
"creationTime": "{{created_at}}",
"workflowName": "restore_cms",
"providedFiles": "{{provided_files}}",
"productLocator": "{{product_locator}}",
"projectMetadata": {
"title": "{{title}}",
"observer": "{{observer}}",
"startTime": "{{startTime}}",
"telescope": "{{telescope}}",
"projectCode": "{{projectCode}}"
},
"calProductLocator": "{{cal_locator}}",
"destinationDirectory": "{{root_directory}}/{{relative_path}}",
"casaHome": "{{casa_home}}"
}
\ No newline at end of file
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