mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Merge pull request #13541 from ic4f/dev_13376_migration
Add source_metadata column to workflow table as alembic revision
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
"""add workflow.source_metadata column
|
||||
|
||||
Revision ID: b182f655505f
|
||||
Revises: e7b6dcb09efd
|
||||
Create Date: 2022-03-14 12:56:57.067748
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
from sqlalchemy import Column
|
||||
|
||||
from galaxy.model.custom_types import JSONType
|
||||
from galaxy.model.migrations.util import drop_column
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "b182f655505f"
|
||||
down_revision = "e7b6dcb09efd"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column("workflow", Column("source_metadata", JSONType))
|
||||
|
||||
|
||||
def downgrade():
|
||||
drop_column("workflow", "source_metadata")
|
||||
@@ -0,0 +1,6 @@
|
||||
from alembic import op
|
||||
|
||||
|
||||
def drop_column(table, column):
|
||||
with op.batch_alter_table(table) as batch_op:
|
||||
batch_op.drop_column(column)
|
||||
Reference in New Issue
Block a user