fixes #2980 - use shorter index name due to PostgreSQL limit

Tested on PostgreSQL and SQLite.