mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
848ec32df0
Sometimes, in order to provide a cross-db behaviour of unique indexes mixing null and not null columns, we create, under the hood, some function based indexes. When that happens get_indexes() is returning the name of the expression objects used to calculate that function index. But we need the original column names to be able to compare indexes and get column dependencies properly. So, this patch just looks, when the index is unique and function based, to the expressions (pretty standard CASE statements) and gets the original column name from it. Covered with tests.