mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
migrations: Remove pgroonga check for postgres database.
Zulip has only supported postgres for a long time, and this is unlikely to change, so this code was just extra clutter.
This commit is contained in:
@@ -9,12 +9,12 @@ class Migration(migrations.Migration):
|
|||||||
]
|
]
|
||||||
|
|
||||||
database_setting = settings.DATABASES["default"]
|
database_setting = settings.DATABASES["default"]
|
||||||
if "postgres" in database_setting["ENGINE"]:
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
"""
|
"""
|
||||||
DO $$BEGIN
|
DO $$BEGIN
|
||||||
EXECUTE format('ALTER ROLE %%I SET search_path TO %%L,public,pgroonga,pg_catalog', %(USER)s, %(SCHEMA)s);
|
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);
|
USING pgroonga(search_pgroonga pgroonga.text_full_text_search_ops);
|
||||||
END$$
|
END$$
|
||||||
""",
|
""",
|
||||||
database_setting,
|
database_setting,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
"""
|
"""
|
||||||
DO $$BEGIN
|
DO $$BEGIN
|
||||||
SET search_path = %(SCHEMA)s,public,pgroonga,pg_catalog;
|
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);
|
EXECUTE format('ALTER ROLE %%I SET search_path TO %%L,public', %(USER)s, %(SCHEMA)s);
|
||||||
END$$
|
END$$
|
||||||
""",
|
""",
|
||||||
database_setting,
|
database_setting,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
else:
|
|
||||||
operations = []
|
|
||||||
|
Reference in New Issue
Block a user