ktmud commented on code in PR #20936:
URL: https://github.com/apache/superset/pull/20936#discussion_r936086818
##########
superset/migrations/versions/2022-07-07_13-00_c747c78868b6_migrating_legacy_treemap.py:
##########
@@ -29,6 +32,14 @@
def upgrade():
+ # Ensure `slice.params` and `slice.query_context`` in MySQL is MEDIUMTEXT
+ # before migration, as the migration will save a duplicate form_data backup
+ # which may significantly increase the size of these fields.
+ if isinstance(op.get_bind().dialect, MySQLDialect):
+ # If the columns are already MEDIUMTEXT, this is a no-op
+ op.execute("ALTER TABLE slices MODIFY params MEDIUMTEXT")
Review Comment:
Because this is only for one dialect and raw SQL is easier to read. People
can also copy the statement directly if they ever want to test it manually.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]