get_indexes_sql() in src/datajoint/adapters/mysql.py queries COALESCE(COLUMN_NAME, CONCAT('(', EXPRESSION, ')')) from information_schema.STATISTICS, but the EXPRESSION column only exists in MySQL 8.0.13+. On MySQL 5.7 or MariaDB, this fails with Unknown column 'EXPRESSION' in 'field list' the first time any table class is decorated with @schema.
Introduced in commit bd35a7e (PR #1338). Prior to that, the query just selected COLUMN_NAME directly.
A fallback for when EXPRESSION isn't available would fix this for both MySQL < 8.0.13 and MariaDB.
get_indexes_sql()insrc/datajoint/adapters/mysql.pyqueriesCOALESCE(COLUMN_NAME, CONCAT('(', EXPRESSION, ')'))frominformation_schema.STATISTICS, but theEXPRESSIONcolumn only exists in MySQL 8.0.13+. On MySQL 5.7 or MariaDB, this fails withUnknown column 'EXPRESSION' in 'field list'the first time any table class is decorated with@schema.Introduced in commit bd35a7e (PR #1338). Prior to that, the query just selected
COLUMN_NAMEdirectly.A fallback for when
EXPRESSIONisn't available would fix this for both MySQL < 8.0.13 and MariaDB.