5 Commits
Author SHA1 Message Date
dualfroz d2e0a2a79a Describe this repository 2026-10-22 21:03:50 +02:00
dualfroz 0a2e162014 Match declared and existing indexes one to one during sync
Sync paired each declared index with the first existing index that had an
equal definition and did not mark that index as taken. Two declared indexes
with the same definition could therefore claim the same database index: the
other one was dropped as unmatched and never recreated, or a missing one was
never added.

Claim an existing index with the same name and an equal definition first,
then let the remaining declared indexes fall back to any unclaimed existing
index with an equal definition, so renamed indexes are still kept as before.
Iterate in name order so the result no longer depends on map order.
2026-09-29 15:57:45 +02:00
upstream ebe852f332 Upstream gitea-xorm/xorm state of the touched files before ea8835f2c2 2026-09-29 15:57:45 +02:00
dualfroz 9fa1420535 Read mssql index columns in key order
Index.Equal compares columns by position, but the mssql GetIndexes query
had no ORDER BY, so the column order it returned was up to the query plan.
2026-09-29 15:57:45 +02:00
upstream d9f01bc901 Upstream gitea-xorm/xorm state of the touched files before 56d44eba01 2026-09-29 15:57:45 +02:00