Skip to content

Commit

Permalink
fix(change coltype illumina sequencing run) (#3277) (patch)
Browse files Browse the repository at this point in the history
# Description

Change column type from float to biginteger
  • Loading branch information
ChrOertlin authored May 27, 2024
1 parent 23486aa commit 4e52d9d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions alembic/versions/2024_05_27_ec2db27c06e3_adjust_col_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""adjust-col-type
Revision ID: ec2db27c06e3
Revises: 18e3b2aba252
Create Date: 2024-05-27 08:47:58.856322
"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "ec2db27c06e3"
down_revision = "18e3b2aba252"
branch_labels = None
depends_on = None


def upgrade():
op.alter_column(
table_name="illumina_sequencing_run",
column_name="yield_q30",
type_=sa.types.BigInteger(),
existing_type=sa.types.Float(),
)


def downgrade():
op.alter_column(
table_name="illumina_sequencing_run",
column_name="yield_q30",
type_=sa.types.Float(),
existing_type=sa.types.BigInteger(),
)
2 changes: 1 addition & 1 deletion cg/store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ class IlluminaSequencingRun(InstrumentRun):
percent_q30: Mapped[Num_6_2 | None]
mean_quality_score: Mapped[Num_6_2 | None]
total_yield: Mapped[BigInt | None]
yield_q30: Mapped[Num_6_2 | None]
yield_q30: Mapped[BigInt | None]
cycles: Mapped[int | None]
demultiplexing_software: Mapped[Str32 | None]
demultiplexing_software_version: Mapped[Str32 | None]
Expand Down

0 comments on commit 4e52d9d

Please sign in to comment.