You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2020/10/01 23:26:39 UTC

[incubator-superset] branch john-bodley--fix-18532d70ab98 created (now 9034c39)

This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a change to branch john-bodley--fix-18532d70ab98
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


      at 9034c39  fix: Alembic migration 18532d70ab98

This branch includes the following new commits:

     new 9034c39  fix: Alembic migration 18532d70ab98

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-superset] 01/01: fix: Alembic migration 18532d70ab98

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch john-bodley--fix-18532d70ab98
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 9034c39b8715cc9f8474921670ebd37fad8bb442
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Thu Oct 1 16:26:22 2020 -0700

    fix: Alembic migration 18532d70ab98
---
 .../versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py b/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
index c011c06..9303733 100644
--- a/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
+++ b/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
@@ -34,9 +34,11 @@ def upgrade():
     bind = op.get_bind()
     if isinstance(bind.dialect, MySQLDialect):
         # index only exists in mysql db
-        with op.get_context().autocommit_block():
-            op.drop_constraint("table_name", "tables", type_="unique")
-
+        try:
+            with op.get_context().autocommit_block():
+                op.drop_constraint("table_name", "tables", type_="unique")
+        except Exception as ex:
+            print(ex)
 
 def downgrade():
     pass