You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ar...@apache.org on 2023/04/11 19:04:43 UTC

[superset] branch master updated: fix(migration): Only attempt to drop types if they exist (#23650)

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

arivero pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 61ddfe6972 fix(migration): Only attempt to drop types if they exist (#23650)
61ddfe6972 is described below

commit 61ddfe69725586acab1f04b8334fc2d6181b4a4f
Author: Jack Fragassi <jf...@gmail.com>
AuthorDate: Tue Apr 11 12:04:22 2023 -0700

    fix(migration): Only attempt to drop types if they exist (#23650)
---
 ...03-29_20-30_07f9a902af1b_drop_postgres_enum_constrains_for_tags.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/migrations/versions/2023-03-29_20-30_07f9a902af1b_drop_postgres_enum_constrains_for_tags.py b/superset/migrations/versions/2023-03-29_20-30_07f9a902af1b_drop_postgres_enum_constrains_for_tags.py
index 442f2b3b86..638ba3e466 100644
--- a/superset/migrations/versions/2023-03-29_20-30_07f9a902af1b_drop_postgres_enum_constrains_for_tags.py
+++ b/superset/migrations/versions/2023-03-29_20-30_07f9a902af1b_drop_postgres_enum_constrains_for_tags.py
@@ -37,8 +37,8 @@ def upgrade():
             'ALTER TABLE "tagged_object" ALTER COLUMN "object_type" TYPE VARCHAR'
         )
         conn.execute('ALTER TABLE "tag" ALTER COLUMN "type" TYPE VARCHAR')
-        conn.execute("DROP TYPE objecttypes")
-        conn.execute("DROP TYPE tagtypes")
+        conn.execute("DROP TYPE IF EXISTS objecttypes")
+        conn.execute("DROP TYPE IF EXISTS tagtypes")
 
 
 def downgrade():