Skip to content

Commit a99f861

Browse files
author
Thomas Preud'homme
committed
[LNT] Fix sql index name collision
Summary: As revealed by the exception printing failure prior to the previous commit, sqllite throws an error when creating the index for the RegressionID field for the NT and link testsuite schemas since they have the same name. This commit adds the testsuite schema to the index name to avoid this collision. Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls, leandron, PrzemekWirkus Reviewed By: PrzemekWirkus Subscribers: arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D68799
1 parent 1c1509a commit a99f861

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lnt/server/db/migrations/upgrade_15_to_16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def _mk_index_on(engine, ts_name):
1212
fc_table = introspect_table(engine, "{}_FieldChangeV2".format(ts_name))
1313

14-
fast_fc_lookup = Index('idx_fast_fieldchange_lookup', fc_table.c.StartOrderID)
14+
fast_fc_lookup = Index('{}_idx_fast_fieldchange_lookup'.format(ts_name), fc_table.c.StartOrderID)
1515
try:
1616
fast_fc_lookup.create(engine)
1717
except (sqlalchemy.exc.OperationalError, sqlalchemy.exc.ProgrammingError) as e:

lnt/server/db/migrations/upgrade_16_to_17.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def _mk_index_on(engine, ts_name):
1212
fc_table = introspect_table(engine, "{}_RegressionIndicator".format(ts_name))
1313

14-
fast_fc_lookup = Index('idx_fast_ri_lookup', fc_table.c.RegressionID)
14+
fast_fc_lookup = Index('{}_idx_fast_ri_lookup'.format(ts_name), fc_table.c.RegressionID)
1515
try:
1616
fast_fc_lookup.create(engine)
1717
except (sqlalchemy.exc.OperationalError, sqlalchemy.exc.ProgrammingError) as e:

0 commit comments

Comments
 (0)