From a09db4f79921f3fc42a9cb99dca9a3ea443d3b2d Mon Sep 17 00:00:00 2001 From: islean Date: Fri, 15 Dec 2023 16:50:36 +0100 Subject: [PATCH] Add columns --- ...7ec5c4c0380_add_concentration_for_cfdna.py | 38 +++++++++++++++++++ cg/store/models.py | 2 + 2 files changed, 40 insertions(+) create mode 100644 alembic/versions/2023_12_15_27ec5c4c0380_add_concentration_for_cfdna.py diff --git a/alembic/versions/2023_12_15_27ec5c4c0380_add_concentration_for_cfdna.py b/alembic/versions/2023_12_15_27ec5c4c0380_add_concentration_for_cfdna.py new file mode 100644 index 0000000000..351b049cbc --- /dev/null +++ b/alembic/versions/2023_12_15_27ec5c4c0380_add_concentration_for_cfdna.py @@ -0,0 +1,38 @@ +"""Add concentration for cfdna + +Revision ID: 27ec5c4c0380 +Revises: b105b426af99 +Create Date: 2023-12-15 16:47:19.031328 + +""" +import sqlalchemy as sa + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "27ec5c4c0380" +down_revision = "b105b426af99" +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column( + table_name="application", + column=sa.Column( + "sample_concentration_minimum_cfdna", + sa.DECIMAL(6, 2), + ), + ) + op.add_column( + table_name="application", + column=sa.Column( + "sample_concentration_maximum_cfdna", + sa.DECIMAL(6, 2), + ), + ) + + +def downgrade(): + op.drop_column(table_name="application", column_name="sample_concentration_maximum_cfdna") + op.drop_column(table_name="application", column_name="sample_concentration_minimum_cfdna") diff --git a/cg/store/models.py b/cg/store/models.py index e3065a0b3c..a5adf0dbfb 100644 --- a/cg/store/models.py +++ b/cg/store/models.py @@ -106,6 +106,8 @@ class Application(Model): sample_concentration = Column(types.Text) sample_concentration_minimum = Column(types.DECIMAL) sample_concentration_maximum = Column(types.DECIMAL) + sample_concentration_minimum_cfdna = Column(types.DECIMAL) + sample_concentration_maximum_cfdna = Column(types.DECIMAL) priority_processing = Column(types.Boolean, default=False) details = Column(types.Text) limitations = Column(types.Text)