Skip to content
Snippets Groups Projects
Commit aa20f4de authored by Daniel Lyons's avatar Daniel Lyons
Browse files

Add the is_srdp flag to the parameters in the capability versions

parent 6af08d79
No related branches found
No related tags found
1 merge request!725Add the is_srdp flag to the parameters in the capability versions
Pipeline #4045 passed
#
# Copyright (C) 2021 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of NRAO Workspaces.
#
# Workspaces is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Workspaces is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
"""WS-705-update-is-srdp-flag-in-parameters
Revision ID: 744607468aeb
Revises: eda4094d32bd
Create Date: 2022-01-14 16:02:14.098271
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "744607468aeb"
down_revision = "eda4094d32bd"
branch_labels = None
depends_on = None
def upgrade():
op.execute(
"""
update capability_versions
set parameters = jsonb_insert(parameters::jsonb, '{"is_srdp"}', 'false', true)::json
where not parameters::jsonb ? 'is_srdp'
"""
)
def downgrade():
# This is much harder to undo than to do, but it's probably harmless to leave in anyway...
pass
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