Problem/Motivation
As discussed in #1008128: Do not use a single underscore as table and index separator on PostgreSQL and SQLite, naming collisions can occur between indexes and table names in SQLite and PostgresSQL.
That issue was closed in favor of #998898: Make sure that the identifiers are not more the 63 characters on PostgreSQL, but only the PostgresSQL part was fixed. This issue still affects SQLite
We wanted to add an index called search_api_language
on the search_api_db_default_index
resulting in the index namesearch_api_db_default_index_search_api_language
. This conflicted because we already have a table with that name.
I discovered this issue when fixing tests for Search API with SQLite enabled. SQLite gave us a conflicts because table names and index names have to be unique. They weren't and Drupal Core didn't solve this properly, as it does with the other SQL backends.
Proposed resolution
A patch attached in #2 implements the same fix as originally proposed in #1008128: Do not use a single underscore as table and index separator on PostgreSQL and SQLite.
Remaining tasks
Discuss, possibly write an upgrade path?
User interface changes
None
API changes
None
Data model changes
A double underscore is added to index names.