Skip to content

Commit

Permalink
Add column
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Dec 11, 2023
1 parent f2aca7f commit 23e9f9b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 2 additions & 0 deletions cg/store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 23e9f9b

Please sign in to comment.