Final Class Yiisoft\Db\Constant\ReferentialAction
| Inheritance | Yiisoft\Db\Constant\ReferentialAction |
|---|
ReferentialAction represents the possible foreign key actions that can be performed on the referenced table.
The constants are used to specify ON DELETE and ON UPDATE actions by {@see \Yiisoft\Db\Constant\ForeignKey::onDelete()},
{@see \Yiisoft\Db\Constant\ForeignKey::onUpdate()}, {@see \Yiisoft\Db\Constant\DDLQueryBuilderInterface::addForeignKey()}
and {@see \Yiisoft\Db\Constant\CommandInterface::addForeignKey()}.
MSSQL does not support RESTRICT keyword but uses this behavior by default (if no action is specified).
Oracle supports only CASCADE and SET NULL key worlds and only ON DELETE clause.
NO ACTION is used by default for ON DELETE and ON UPDATE (if no action is specified).
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| CASCADE | 'CASCADE' | Yiisoft\Db\Constant\ReferentialAction | |
| NO_ACTION | 'NO ACTION' | Yiisoft\Db\Constant\ReferentialAction | |
| RESTRICT | 'RESTRICT' | Yiisoft\Db\Constant\ReferentialAction | |
| SET_DEFAULT | 'SET DEFAULT' | Yiisoft\Db\Constant\ReferentialAction | |
| SET_NULL | 'SET NULL' | Yiisoft\Db\Constant\ReferentialAction |
Signup or Login in order to comment.