Skip to content

Commit

Permalink
Add is_cancelled field (#3506)
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard authored Aug 2, 2024
1 parent 36c50aa commit 4abea51
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions alembic/versions/2024_08_02_601a2f272754_add_cancelled_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Add cancelled status
Revision ID: 601a2f272754
Revises: 0ca61967d364
Create Date: 2024-08-02 11:59:42.391980
"""

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = "601a2f272754"
down_revision = "0ca61967d364"
branch_labels = None
depends_on = None


def upgrade():
op.add_column(
table_name="sample",
column=sa.Column("is_cancelled", sa.Boolean(), nullable=False, default=False),
)


def downgrade():
op.drop_column(table_name="sample", column_name="is_cancelled")
1 change: 1 addition & 0 deletions cg/store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ class Sample(Base, PriorityMixin):
application_version: Mapped[ApplicationVersion] = orm.relationship(
foreign_keys=[application_version_id]
)
is_cancelled: Mapped[bool] = mapped_column(default=False, nullable=False)
capture_kit: Mapped[Str64 | None]
comment: Mapped[Text | None]
control: Mapped[str | None] = mapped_column(
Expand Down

0 comments on commit 4abea51

Please sign in to comment.