using postgresql i encountered an error about index name truncated for being too long
and resulted in a failure to create a table for index naming collision
i found that both _field_sql_storage_indexname and
http://api.drupal.org/api/drupal/includes!database!pgsql!schema.inc/function/DatabaseSchema_pgsql%3A%3A_createIndexSql/7">_createIndexSql prefixes the name with the table name
i believe the solution is for _field_sql_storage_indexname to simply return $index
Comment | File | Size | Author |
---|---|---|---|
#5 | remove-index-name-prefix-5.patch | 2.84 KB | Anonymous (not verified) |
#4 | remove-index-name-prefix-4.patch | 699 bytes | Anonymous (not verified) |
Comments
Comment #0.0
yakoub CreditAttribution: yakoub commentedfailure in creating table
Comment #1
yakoub CreditAttribution: yakoub commentedComment #2
tim.plunkettCan you confirm that this is also a bug in D8?
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedThat's a good point. Index names in Drupal are always local to a table, so we don't need to prefix with the table name in _field_sql_storage_indexname().
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch attempt.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedNew patch accounts for $name variable.
Comment #6.0
(not verified) CreditAttribution: commentedlink to functions
Comment #15
quietone CreditAttribution: quietone as a volunteer commentedThis patch is no longer relevant for Drupal 8/9, field_sql_storage.module was removed in #1497374: Switch from Field-based storage to Entity-based storage.
Move back to Drupal 7.