diff --git a/pgroonga/migrations/0001_enable.py b/pgroonga/migrations/0001_enable.py index cbffa67abe..6156b41625 100644 --- a/pgroonga/migrations/0001_enable.py +++ b/pgroonga/migrations/0001_enable.py @@ -9,12 +9,12 @@ class Migration(migrations.Migration): ] database_setting = settings.DATABASES["default"] - if "postgres" in database_setting["ENGINE"]: - operations = [ - migrations.RunSQL( - [ - ( - """ + + operations = [ + migrations.RunSQL( + [ + ( + """ DO $$BEGIN EXECUTE format('ALTER ROLE %%I SET search_path TO %%L,public,pgroonga,pg_catalog', %(USER)s, %(SCHEMA)s); @@ -29,12 +29,12 @@ CREATE INDEX zerver_message_search_pgroonga ON zerver_message USING pgroonga(search_pgroonga pgroonga.text_full_text_search_ops); END$$ """, - database_setting, - ) - ], - [ - ( - """ + database_setting, + ) + ], + [ + ( + """ DO $$BEGIN SET search_path = %(SCHEMA)s,public,pgroonga,pg_catalog; @@ -46,10 +46,8 @@ SET search_path = %(SCHEMA)s,public; EXECUTE format('ALTER ROLE %%I SET search_path TO %%L,public', %(USER)s, %(SCHEMA)s); END$$ """, - database_setting, - ) - ], - ), - ] - else: - operations = [] + database_setting, + ) + ], + ), + ]