Skip to content
Snippets Groups Projects
Commit abbe29f4 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fix naming patterns and remove unneeded migration

parent c2c6be1c
No related branches found
No related tags found
1 merge request!975fix naming patterns and remove unneeded migration
Pipeline #5624 passed
......@@ -163,7 +163,7 @@ def create_follow_on_capability_request(request: Request) -> Response:
"user_email": user_email,
"sdmId": sdm_id,
"cms_path": cms_path,
"calibration_req_id": request_id,
"parent_request_id": request_id,
},
)
......
......@@ -148,7 +148,7 @@ def test_create_follow_on_capability_request(
fake_v2.version_number = 2
fake_v2.parameters = {
"user_email": "nobody@nowhere.edu",
"calibration_req_id": fake_capability_request.id,
"parent_request_id": fake_capability_request.id,
}
fake_exec = CapabilityExecution()
......@@ -198,7 +198,7 @@ def test_create_follow_on_capability_request(
assert response.status_code == http.HTTPStatus.OK
# WS-1062
assert "calibration_req_id" in response.text
assert "parent_request_id" in response.text
response_json = response.json_body
assert len(response_json["versions"]) == 2
......
# 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/>.
"""add parent_request_id to capability_requests
Revision ID: 9f293db230a5
Revises: 416734492102
Create Date: 2022-06-10 11:09:09.294352
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "9f293db230a5"
down_revision = "416734492102"
branch_labels = None
depends_on = None
def upgrade():
# alter table capability_requests add column parent_request_id integer
op.execute("alter table capability_requests add column parent_request_id integer")
def downgrade():
op.execute("alter table capability_requests drop column if exists parent_request_id")
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