ktmud commented on a change in pull request #11209:
URL: 
https://github.com/apache/incubator-superset/pull/11209#discussion_r502211128



##########
File path: 
superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
##########
@@ -149,6 +168,6 @@ def downgrade():
 
     # remove uuid column
     for table_name, model in models.items():
-        with op.batch_alter_table(model) as batch_op:
-            batch_op.drop_constraint(f"uq_{table_name}_uuid")
+        with op.batch_alter_table(model.__tablename__) as batch_op:
+            batch_op.drop_constraint(f"uq_{table_name}_uuid", type_="unique")

Review comment:
       MySQL will throw an error if `type_` is not specified.

##########
File path: 
superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
##########
@@ -71,20 +74,31 @@ class ImportMixin:
 
 models["dashboards"].position_json = sa.Column(utils.MediumText())
 
+default_batch_size = int(os.environ.get("BATCH_SIZE", 200))

Review comment:
       This number is not the bigger the better. I tested many different 
numbers (100, 200, 500, 1000, 2000) and 200 seems to be working the best (but 
obviously this will depend on the machine, too).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to