Open Lambik opened 7 years ago
Well, probably not that hard... In ForeignKeyGenerator.php the code explicity takes element [0].
Perhaps it could be an option to implode(',', $foreignKey->getLocalColumns())
? Or just return the entire array as array, and only later when actually making migrations, take [0]? So I can do the thing I want with your code, and you can still do your goal easily?
Hi,
I'm using your library not to generate migrations, but to analyse table structure in an external database.
It works fine with regular foreign keys (one field points to another table's field), but when I have a table with a combined primary key, it doesn't work anymore:
Then running the code (from artisan tinker):
I would expect to see both 'id1' and 'id2' in the 'references' field, as well as 'boink1_id1' and 'boink1_id2' in the 'field' field.
I know it's not really a relevant laravel case, but would it be hard to fix/update?