Skip to content

Exporting all triggers when using include-tables #270

@juppwerner

Description

@juppwerner

Hello,

I have skip-triggers set to false.
I am also using include-tables to only select some tables.

I expect to only get the triggers related to the included tables. But all triggers get exported.

I believe a fix could be:

public function getDatabaseStructureTriggers()
{
    // Listing all triggers from database
    if (false === $this->dumpSettings['skip-triggers']) {
        foreach ($this->dbHandler->query($this->typeAdapter->show_triggers($this->dbName)) as $row) {
            if(in_array($row['Table'], $this->dumpSettings['include-views']))
                array_push($this->triggers, $row['Trigger']);
        }
    }
    return;
}

Thank you.

Regards
Joachim

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions