Trigger
Less than 1 minute
Trigger
Represents a database trigger for migration actions.
class Trigger extends \Hazaar\DBI\Manager\Migration\Action\BaseActionEncapsulates trigger attributes such as name, table, events, timing, orientation, and body. Provides methods for creating, altering, and dropping triggers in migration processes.
Properties
name
The name of the trigger.
public string $nametable
The name of the table the trigger applies to.
public string $tableevents
The events that fire the trigger (e.g., INSERT, UPDATE, DELETE).
public array $eventstiming
The timing of the trigger (e.g., BEFORE, AFTER).
public string $timingorientation
The orientation of the trigger (e.g., ROW, STATEMENT).
public string $orientationbody
The body of the trigger (the code to execute).
public string $bodyMethods
create
Creates the trigger in the database.
public create(Adapter $dbi): boolParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | the database adapter instance |
alter
Alters the trigger in the database.
public alter(Adapter $dbi): boolParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | the database adapter instance |
drop
Drops the trigger from the database.
public drop(Adapter $dbi): boolParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | the database adapter instance |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000