-
Notifications
You must be signed in to change notification settings - Fork 16
/
post_db_create.sql
20 lines (17 loc) · 1.09 KB
/
post_db_create.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ALTER TABLE documents_correspondent ALTER COLUMN name TYPE text;
ALTER TABLE documents_correspondent ALTER COLUMN slug TYPE text;
ALTER TABLE documents_correspondent ALTER COLUMN match TYPE text;
ALTER TABLE documents_tag ALTER COLUMN name TYPE text;
ALTER TABLE documents_tag ALTER COLUMN slug TYPE text;
ALTER TABLE documents_tag ALTER COLUMN match TYPE text;
ALTER TABLE documents_document ALTER COLUMN title TYPE text;
ALTER TABLE documents_document ALTER COLUMN title TYPE text;
DROP INDEX documents_document_content_aa150741;
DROP INDEX documents_document_content_aa150741_like;
ALTER TABLE django_admin_log ALTER COLUMN object_repr TYPE text;
CREATE EXTENSION pg_trgm;
DROP INDEX documents_document_content;
CREATE INDEX documents_document_content ON documents_document USING GIN (upper(content) gin_trgm_ops);
CREATE INDEX documents_correspondent_name ON documents_correspondent USING GIN (upper(name) gin_trgm_ops);
CREATE INDEX documents_document_title ON documents_document USING GIN (upper(title) gin_trgm_ops);
CREATE INDEX documents_tag_name ON documents_tag USING GIN (upper(name) gin_trgm_ops);