Beispiel #1
0
 /**
  * Returns all triggers on a table.
  *
  * @param string $table_name The name of the table.
  *
  * @return \array[]
  */
 private function getTableTriggers($table_name)
 {
     AuditDataLayer::disconnect();
     AuditDataLayer::connect('localhost', 'test', 'test', self::$dataSchema);
     $triggers = AuditDataLayer::getTableTriggers(self::$dataSchema, $table_name);
     return $triggers;
 }
Beispiel #2
0
 /**
  * Returns all triggers on a table.
  *
  * @param string $table_name The name of the table.
  *
  * @return \array[]
  */
 private function getTableTriggers($table_name)
 {
     $triggers = AuditDataLayer::getTableTriggers(self::$dataSchema, $table_name);
     return $triggers;
 }
Beispiel #3
0
 /**
  * Drops all triggers from this table.
  */
 private function dropTriggers()
 {
     $triggers = AuditDataLayer::getTableTriggers($this->configTable->getSchemaName(), $this->configTable->getTableName());
     foreach ($triggers as $trigger) {
         $this->io->logVerbose('Dropping trigger <dbo>%s</dbo> on <dbo>%s.%s</dbo>', $trigger['trigger_name'], $this->configTable->getSchemaName(), $this->configTable->getTableName());
         AuditDataLayer::dropTrigger($this->configTable->getSchemaName(), $trigger['trigger_name']);
     }
 }