[dashboards] Increasing position_json to MEDIUMTEXT for MySQL (#5618)

This commit is contained in:
John Bodley
2018-08-13 14:52:59 -07:00
committed by GitHub
parent 2685ab4f1f
commit e0c02be14e
3 changed files with 44 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
"""position_json
Revision ID: 1a1d627ebd8e
Revises: 0c5070e96b57
Create Date: 2018-08-13 11:30:07.101702
"""
# revision identifiers, used by Alembic.
revision = '1a1d627ebd8e'
down_revision = '0c5070e96b57'
from alembic import op
import sqlalchemy as sa
from superset.utils import MediumText
def upgrade():
with op.batch_alter_table('dashboards') as batch_op:
batch_op.alter_column(
'position_json',
existing_type=sa.Text(),
type_=MediumText(),
existing_nullable=True,
)
def downgrade():
with op.batch_alter_table('dashboards') as batch_op:
batch_op.alter_column(
'position_json',
existing_type=MediumText(),
type_=sa.Text(),
existing_nullable=True,
)