Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jun 2016 at 15:18 UTC
Updated:
7 Jul 2016 at 22:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ekes commentedThink this is the correct test. Adds unique keys along with the indexes.
Comment #3
ekes commentedCorrect test.
It also didn't test additional index in the schema, so adding that as well.
Comment #4
ekes commentedWith fix.
Comment #5
dawehnerJust a note for myself: this method is used for the foreign keys as well
It seems to be that adding a testcase for this case would be helpful as well.
Comment #6
ekes commentedIt's adding index and unique key tests, and foreign key is already tested. What should be added further?
Comment #7
dawehnerWell a unique key without an array for the column names.
Comment #8
ekes commentedAh. So it was testing that line:
$data_schema['unique keys'][$real_name][] = $table_mapping->getFieldColumnName($storage_definition, $column_name);. What wasn't tested there was the array case in the other half of the if/else where it is a column name and a size. So for completeness added that for index and unique.Comment #9
dawehnerCool, thank you!
Comment #10
amateescu commentedThe patch looks great to me, I just found a small nit:
Should we replace 'Indexes' with 'Unique keys' at the beginning of the sentence?
Comment #11
ekes commentedAh yes. Corrected.
Comment #12
amateescu commentedNice, looks great now :)
Comment #15
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!