/**
  * Prepare drop trigger statement.
  *
  * @param  TriggerInterface $trigger
  * @return string
  */
 public function prepareDropTriggerStatement(TriggerInterface $trigger)
 {
     return 'DROP TRIGGER IF EXISTS ' . $this->getConnection()->escapeFieldName($trigger->getName()) . ';';
 }
Example #2
0
 /**
  * @param  TriggerInterface $trigger
  * @return $this
  */
 public function &addTrigger(TriggerInterface $trigger)
 {
     if (empty($this->triggers[$trigger->getName()])) {
         $this->triggers[$trigger->getName()] = $trigger;
     } else {
         throw new InvalidArgumentException("Trigger '" . $trigger->getName() . "' already exists in this type");
     }
     return $this;
 }