From 0d32c73b71abb10b55c6c189fb60f13946c820f3 Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Tue, 21 Jun 2022 11:08:26 +0100 Subject: [PATCH] fix: RLS new db migration downgrade fails on SQLite --- ...-06-19_16-17_f3afaf1f11f0_add_unique_name_desc_rls.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/superset/migrations/versions/2022-06-19_16-17_f3afaf1f11f0_add_unique_name_desc_rls.py b/superset/migrations/versions/2022-06-19_16-17_f3afaf1f11f0_add_unique_name_desc_rls.py index 0d8b3334a4fcf..3a6cc03be0ba7 100644 --- a/superset/migrations/versions/2022-06-19_16-17_f3afaf1f11f0_add_unique_name_desc_rls.py +++ b/superset/migrations/versions/2022-06-19_16-17_f3afaf1f11f0_add_unique_name_desc_rls.py @@ -72,8 +72,7 @@ def upgrade(): def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.drop_constraint("uq_rls_name", "row_level_security_filters", type_="unique") - op.drop_column("row_level_security_filters", "description") - op.drop_column("row_level_security_filters", "name") - # ### end Alembic commands ### + with op.batch_alter_table("row_level_security_filters") as batch_op: + batch_op.drop_constraint("uq_rls_name", type_="unique") + batch_op.drop_column("description") + batch_op.drop_column("name")