Skip to content

Unable to execute query for trigger #154

@tunder

Description

@tunder

After updating from version 0.1.2 to latest dev-master executing queries like this

$this->execute("
    CREATE TRIGGER `name` BEFORE UPDATE ON `table`
        statement 1 goes here;
        statement 2 goes here;
    END;;
");

does not work anymore.

Cause:
Ruckusing_Migration_Base::split_query
This feature is useless. Having multiple sql queries inside the same string. Writing migrations is the developer job and we know that (at least) mysql doesn't support it. Why should you? This will be the source of many bugs.

Some examples where this function will fail:
triggers, stored procedures, etc.
query like: insert into table set field = 'string \'quote1; quote2\'';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions