Skip to content

Commit cfb8c9d

Browse files
committed
DB Column for Score Set Level Score Thresholds
1 parent d39c58e commit cfb8c9d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""score set level score thresholds
2+
3+
Revision ID: aa73d39b3705
4+
Revises: 03c7124c33e1
5+
Create Date: 2024-11-13 11:23:57.917725
6+
7+
"""
8+
9+
from alembic import op
10+
import sqlalchemy as sa
11+
from sqlalchemy.dialects import postgresql
12+
13+
# revision identifiers, used by Alembic.
14+
revision = "aa73d39b3705"
15+
down_revision = "03c7124c33e1"
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
# ### commands auto generated by Alembic - please adjust! ###
22+
op.add_column("scoresets", sa.Column("score_thresholds", postgresql.JSONB(astext_type=sa.Text()), nullable=True))
23+
# ### end Alembic commands ###
24+
25+
26+
def downgrade():
27+
# ### commands auto generated by Alembic - please adjust! ###
28+
op.drop_column("scoresets", "score_thresholds")
29+
# ### end Alembic commands ###

src/mavedb/models/score_set.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ class ScoreSet(Base):
157157

158158
target_genes: Mapped[List["TargetGene"]] = relationship(back_populates="score_set", cascade="all, delete-orphan")
159159
score_ranges = Column(JSONB, nullable=True)
160+
score_thresholds = Column(JSONB, nullable=True)
160161

161162
# Unfortunately, we can't use association_proxy here, because in spite of what the documentation seems to imply, it
162163
# doesn't check for a pre-existing keyword with the same text.

0 commit comments

Comments
 (0)