Ticket #1362 (closed defect: fixed)
Bug in migration builder's foreign key name generation
| Reported by: | wolfpakz | Owned by: | jwage |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Migrations | Version: | 1.0.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | yes |
Description
Today I ran the migration generator on a table using the Versionable template. It generated a bad name for the foreign key because the builder doesn't handle the local key identifier as an array. The result is foreign key names containing "Array", like this:
$this->createForeignKey('paragraph_versions', array(
'local' => array(0 => 'id'),
'foreign' => array(0 => 'id'),
'foreignTable' => 'paragraphs',
'onUpdate' => 'CASCADE',
'onDelete' => 'CASCADE',
'name' => 'paragraph_versions_Array'
));
I've attached a patch which addresses the issue.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.