-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dashboards] Increasing position_json to MEDIUMTEXT for MySQL
- Loading branch information
John Bodley
committed
Aug 13, 2018
1 parent
50981db
commit eec969f
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
superset/migrations/versions/1a1d627ebd8e_position_json.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,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, | ||
) |
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
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