diff --git a/alembic/versions/2023_12_11_79454ff320bf_add_eligible_for_skip_qc.py b/alembic/versions/2023_12_11_79454ff320bf_add_eligible_for_skip_qc.py new file mode 100644 index 0000000000..4452cc3f40 --- /dev/null +++ b/alembic/versions/2023_12_11_79454ff320bf_add_eligible_for_skip_qc.py @@ -0,0 +1,27 @@ +"""add-eligible-for-skip-qc + +Revision ID: 79454ff320bf +Revises: b105b426af99 +Create Date: 2023-12-11 15:02:40.593762 + +""" +import sqlalchemy as sa + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "79454ff320bf" +down_revision = "b105b426af99" +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column( + "application", + sa.Column("is_eligible_for_skip_qc", sa.Boolean(), nullable=False), + ) + + +def downgrade(): + op.drop_column("application", "is_eligible_for_skip_qc") diff --git a/cg/server/admin.py b/cg/server/admin.py index 47e9a2ffdc..51e200ec9d 100644 --- a/cg/server/admin.py +++ b/cg/server/admin.py @@ -86,6 +86,7 @@ class ApplicationView(BaseView): "sample_concentration", "priority_processing", "is_archived", + "is_eligible_for_skip_qc", ] column_exclude_list = [ "minimum_order", diff --git a/cg/store/models.py b/cg/store/models.py index e3065a0b3c..ce5d03ef11 100644 --- a/cg/store/models.py +++ b/cg/store/models.py @@ -116,6 +116,8 @@ class Application(Model): created_at = Column(types.DateTime, default=dt.datetime.now) updated_at = Column(types.DateTime, onupdate=dt.datetime.now) + is_eligible_for_skip_qc = Column(types.Boolean, default=False, nullable=False) + versions = orm.relationship( "ApplicationVersion", order_by="ApplicationVersion.version", back_populates="application" )