Skip to content
Snippets Groups Projects
Commit 586d4cf1 authored by Janet Goldstein's avatar Janet Goldstein
Browse files

WS-1062-add-parent-req-id-to-capability-req

parent 4c56d93e
No related branches found
Tags end-of-sprint-16.999
1 merge request!971WS-1062-add-parent-req-id-to-capability-req
Pipeline #5580 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/>.
"""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")
......@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
# pylint: disable=C0114, C0115, C0116, E0401, R0201, R0903, W0613, W0621, W1203
# pylint: disable=C0114, C0115, C0116, C0302, E0401, R0903, W0613, W0621, W1203
from __future__ import annotations
......@@ -1149,6 +1149,11 @@ class CapabilityRequest(JSONSerializable):
sa.ForeignKey(QaStaff.user_name),
)
parent_request_id = sa.Column(
"parent_request_id",
sa.Integer,
)
# I suspect the trying to set up bidirectional connections for the AoD/DA is going to
# get confusing, so skipping until desired.
da = relationship(
......
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