-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sequencing times for PacBio run (#3530)(patch)
## Description Add the following fields to the `PacBioSequencingRun` db model: - run_started_at - run_completed_at Remove `movie_time_hours` Create the alembic migration
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
alembic/versions/2024_08_07_817cf7fea40d_add_sequencing_times_pacbio.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Add sequencing times PacBio | ||
Revision ID: 817cf7fea40d | ||
Revises: 601a2f272754 | ||
Create Date: 2024-08-07 10:19:57.450266 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "817cf7fea40d" | ||
down_revision = "601a2f272754" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
"pacbio_sequencing_run", sa.Column("run_started_at", sa.DateTime(), nullable=True) | ||
) | ||
op.add_column( | ||
"pacbio_sequencing_run", | ||
sa.Column("run_completed_at", sa.DateTime(), nullable=True), | ||
) | ||
op.drop_column("pacbio_sequencing_run", "movie_time_hours") | ||
|
||
|
||
def downgrade(): | ||
op.add_column( | ||
"pacbio_sequencing_run", | ||
sa.Column("movie_time_hours", sa.Integer(), nullable=True), | ||
) | ||
op.drop_column("pacbio_sequencing_run", "run_completed_at") | ||
op.drop_column("pacbio_sequencing_run", "run_started_at") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters