sql: add proper suffix to indexes (#33707)

This commit is contained in:
Frédéric Péters 2019-11-29 11:56:58 +01:00
parent 1358df73ea
commit f088bf40bc
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@ def do_formdef_indexes(formdef, created, conn, cur, concurrently=False):
for attr in ('receipt_time', 'anonymised'):
if not table_name + '_' + attr + '_idx' in existing_indexes:
cur.execute('%(create_index)s %(table_name)s_%(attr)s ON %(table_name)s (%(attr)s)' % {
cur.execute('%(create_index)s %(table_name)s_%(attr)s_idx ON %(table_name)s (%(attr)s)' % {
'create_index': create_index,
'table_name': table_name,
'attr': attr})