File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,14 @@ protected function analyzePrimaryKey(array $columns)
217217
218218 protected function analyzeForeignKeys (& $ structure , $ table )
219219 {
220+ $ lowerTable = strtolower ($ table );
220221 foreach ($ this ->connection ->getSupplementalDriver ()->getForeignKeys ($ table ) as $ row ) {
221- $ structure ['belongsTo ' ][strtolower ( $ table ) ][$ row ['local ' ]] = $ row ['table ' ];
222+ $ structure ['belongsTo ' ][$ lowerTable ][$ row ['local ' ]] = $ row ['table ' ];
222223 $ structure ['hasMany ' ][strtolower ($ row ['table ' ])][$ table ][] = $ row ['local ' ];
223224 }
224225
225- if (isset ($ structure ['belongsTo ' ][$ table ])) {
226- uksort ($ structure ['belongsTo ' ][$ table ], function ($ a , $ b ) {
226+ if (isset ($ structure ['belongsTo ' ][$ lowerTable ])) {
227+ uksort ($ structure ['belongsTo ' ][$ lowerTable ], function ($ a , $ b ) {
227228 return strlen ($ a ) - strlen ($ b );
228229 });
229230 }
You can’t perform that action at this time.
0 commit comments