sql: fix migration (#48970)
This commit is contained in:
parent
fcd5d86ee5
commit
a93dfa92b5
|
@ -2691,7 +2691,7 @@ def get_yearly_totals(period_start=None, period_end=None, criterias=None):
|
|||
# latest migration, number + description (description is not used
|
||||
# programmaticaly but will make sure git conflicts if two migrations are
|
||||
# separately added with the same number)
|
||||
SQL_LEVEL = (45, 'add index on formdata(status)')
|
||||
SQL_LEVEL = (46, 'add index on formdata(status) - fix')
|
||||
|
||||
|
||||
def migrate_global_views(conn, cur):
|
||||
|
@ -2817,13 +2817,13 @@ def migrate():
|
|||
# 38: extract submission_agent_id to its own column
|
||||
# 41: update full text normalization
|
||||
set_reindex('formdata', 'needed', conn=conn, cur=cur)
|
||||
if sql_level < 36:
|
||||
if sql_level < 46:
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.carddef import CardDef
|
||||
# 24: add index on evolution(formdata_id)
|
||||
# 35: add indexes on formdata(receipt_time) and formdata(anonymised)
|
||||
# 36: add index on formdata(user_id)
|
||||
# 45: add index on formdata(status)
|
||||
# 45 & 46: add index on formdata(status)
|
||||
for formdef in FormDef.select() + CardDef.select():
|
||||
do_formdef_indexes(formdef, created=False, conn=conn, cur=cur)
|
||||
if sql_level < 32:
|
||||
|
|
Loading…
Reference in New Issue