Action
Less than 1 minute
Action
Represents a migration action, encapsulating its type, name, message, and specification.
class Action extends \Hazaar\DBI\Manager\Migration\StructHandles construction, validation, and execution of migration actions, including special handling for raise and drop actions.
Properties
name
The name of the migration action (e.g., CREATE, DROP, RAISE).
public ActionName $nametype
The type of the migration action (e.g., TABLE, INDEX, EXTENSION).
public ActionType $typemessage
The message associated with the action, if any.
public string $messagespec
The specification object for the action, containing detailed logic.
public BaseAction $specMethods
construct
Initializes the action from the provided data.
public construct(mixed $data): voidHandles special cases for raise, warn, and notice actions, and validates required fields.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | The data to initialize the action from. Modified by reference. |
run
public run(Adapter $dbi): boolParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter |
create
public create(ActionType $type, mixed $spec): selfParameters
| Parameter | Type | Description |
|---|---|---|
$type | ActionType | |
$spec | mixed |
constructed
protected constructed(): voidGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000