sql: enable indexes on receipt_time and anonymised columns (#38901)
This commit is contained in:
parent
2e05d710c1
commit
7faa7f9281
|
@ -2292,7 +2292,7 @@ def get_yearly_totals(period_start=None, period_end=None, criterias=None):
|
|||
return result
|
||||
|
||||
|
||||
SQL_LEVEL = 34
|
||||
SQL_LEVEL = 35
|
||||
|
||||
def migrate_global_views(conn, cur):
|
||||
cur.execute('''SELECT COUNT(*) FROM information_schema.tables
|
||||
|
@ -2406,10 +2406,10 @@ def migrate():
|
|||
# 29: add evolution parts to full-text index
|
||||
# 31: add user_label to formdata
|
||||
set_reindex('formdata', 'needed', conn=conn, cur=cur)
|
||||
if sql_level < 24:
|
||||
if sql_level < 35:
|
||||
from wcs.formdef import FormDef
|
||||
# 24: add index on evolution(formdata_id)
|
||||
# 34: add indexes on formdata(receipt_time) and formdata(anonymised)
|
||||
# 35: add indexes on formdata(receipt_time) and formdata(anonymised)
|
||||
for formdef in FormDef.select():
|
||||
do_formdef_indexes(formdef, created=False, conn=conn, cur=cur)
|
||||
if sql_level < 32:
|
||||
|
|
Loading…
Reference in New Issue