From c94cfb01799f1d2427c92bb8f9fc24e53cf9a9b3 Mon Sep 17 00:00:00 2001 From: dbernstein Date: Thu, 12 Dec 2024 10:07:56 -0800 Subject: [PATCH] =?UTF-8?q?Add=20migration=20to=20remove=20obsolete=20sett?= =?UTF-8?q?ings=20(facets=5Fenabled=5Fcollection=20=E2=80=A6=20(#2204)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...bd6daf_remove_collection_facet_settings.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 alembic/versions/20241202_603b8ebd6daf_remove_collection_facet_settings.py diff --git a/alembic/versions/20241202_603b8ebd6daf_remove_collection_facet_settings.py b/alembic/versions/20241202_603b8ebd6daf_remove_collection_facet_settings.py new file mode 100644 index 000000000..41f873e59 --- /dev/null +++ b/alembic/versions/20241202_603b8ebd6daf_remove_collection_facet_settings.py @@ -0,0 +1,27 @@ +"""Remove collection facet settings + +Revision ID: 603b8ebd6daf +Revises: 8dde64eab209 +Create Date: 2024-12-02 19:42:23.775579+00:00 + +""" + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "603b8ebd6daf" +down_revision = "8dde64eab209" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + conn = op.get_bind() + conn.execute( + "UPDATE libraries set settings_dict = " + "settings_dict - array['facets_enabled_collection', 'facets_default_collection']" + ) + + +def downgrade() -> None: + pass