1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-15 00:05:11 +02:00

Implement CIText as NOCASE alternative in postgresql

This commit is contained in:
Tim Möhlmann
2018-11-20 14:41:17 +02:00
parent 9b9f3731f6
commit 0f3c1b9d15
9 changed files with 60 additions and 16 deletions

View File

@ -7,7 +7,7 @@ import glob
import os
def setup():
conn = psycopg2.connect('user=postgres')
conn = psycopg2.connect(user = 'postgres')
queries = anosql.load_queries('postgres', '/conf/queries.sql')
# Mailu user
queries.create_mailu_user(conn)
@ -21,6 +21,10 @@ def setup():
queries.create_db(conn)
conn.set_isolation_level(1)
conn.close()
conn = psycopg2.connect(user = 'postgres', database= 'mailu')
queries.create_citext(conn)
conn.commit()
conn.close()
# Bootstrap the database if postgresql is running for the first time
if not os.path.exists('/var/lib/postgresql/data/pg_wal'):