forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pgroonga: Upgrade to PGroonga 2 API.
- Loading branch information
1 parent
aaad7fe
commit 46711a4
Showing
5 changed files
with
43 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.db import models, migrations | ||
from django.contrib.postgres import operations | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
atomic = False | ||
|
||
dependencies = [ | ||
('pgroonga', '0002_html_escape_subject'), | ||
] | ||
|
||
database_setting = settings.DATABASES["default"] | ||
operations = [ | ||
migrations.RunSQL([""" | ||
ALTER ROLE %(USER)s SET search_path TO %(SCHEMA)s,public; | ||
SET search_path = %(SCHEMA)s,public; | ||
DROP INDEX zerver_message_search_pgroonga; | ||
""" % database_setting, """ | ||
CREATE INDEX CONCURRENTLY zerver_message_search_pgroonga ON zerver_message | ||
USING pgroonga(search_pgroonga pgroonga_text_full_text_search_ops_v2); | ||
"""], | ||
[""" | ||
ALTER ROLE %(USER)s SET search_path TO %(SCHEMA)s,public,pgroonga,pg_catalog; | ||
SET search_path = %(SCHEMA)s,public,pgroonga,pg_catalog; | ||
DROP INDEX zerver_message_search_pgroonga; | ||
""" % database_setting, """ | ||
CREATE INDEX CONCURRENTLY zerver_message_search_pgroonga ON zerver_message | ||
USING pgroonga(search_pgroonga pgroonga.text_full_text_search_ops); | ||
"""]) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters