Skip to content

Record::buildFields() returns prematurely #19

@clphillips

Description

@clphillips

Since Record::buildFields() also builds keys, it should ensure that keys is also empty before returning.

Currently it's impossible to alter just an index, without also altering fields.

$record->setKey(array('my_index'), 'index', null, false)
    ->alter('my_table'); 

Should produce:

ALERT TABLE `my_table` DROP INDEX `my_index`

Actual result:

ALERT TABLE `my_table` 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions