Skip to content

Commit

Permalink
DB migration for sample sheets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Dec 12, 2024
1 parent dca7150 commit a048d47
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""Implement sample sheets.
Revision ID: ec25b23b08e2
Revises: 75348cfb3715
Create Date: 2024-12-09 10:28:54.902847
"""

from sqlalchemy import Column

from galaxy.model.custom_types import JSONType
from galaxy.model.migrations.util import (
add_column,
drop_column,
transaction,
)

# revision identifiers, used by Alembic.
revision = "ec25b23b08e2"
down_revision = "75348cfb3715"
branch_labels = None
depends_on = None

dataset_collection_element_table = "dataset_collection_element"
dataset_collection_table = "dataset_collection"


def upgrade():
with transaction():
add_column(dataset_collection_table, Column("column_definitions", JSONType(), default=None))
add_column(dataset_collection_element_table, Column("columns", JSONType(), default=None))


def downgrade():
with transaction():
drop_column(dataset_collection_table, "column_definitions")
drop_column(dataset_collection_element_table, "columns")

0 comments on commit a048d47

Please sign in to comment.