Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

migrations: Remove pgroonga check for postgres database.

Tim Abbotte0992c85fb78
diff --git a/pgroonga/migrations/0001_enable.py b/pgroonga/migrations/0001_enable.py
index cbffa67abef..6156b41625c 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,
+ )
+ ],
+ ),
+ ]