Свойство | Type | Description | |
---|---|---|---|
$db | the DB connection object or the application component ID of the DB connection. | ||
$defaultAction | |||
$migrationTable | a migration table name |
Méthode | Description | |
---|---|---|
actionCreate ( string $schema = '' ) : integer | Generates the 'createTable' code. | |
actionDrop ( string $schema = '' ) : integer | Generates the 'dropTable' code. | |
beforeAction ( $action ) | ||
options ( $actionID ) |
Méthode | Description | |
---|---|---|
getColumnsDefinition ( array $columns ) : string | Returns the columns definition. | |
getForeignKeyDefinition ( TableSchema[] $table ) : string | null | Returns the foreign key definition. | |
getPrimaryKeyDefinition ( array $pk, string $stdout, integer $offset ) : string | null | Returns the primary key definition. | |
getSchemaType ( ColumnSchema[] $column ) : string | Returns the schema type. | |
otherDefinition ( ColumnSchema[] $column ) : string | Returns the other definition. | |
type ( string $type ) : string | Returns the constant strings of yii\db\Schema class. e.g. Schema::TYPE_PK |
public actionCreate ( string $schema = '' ) : integer | ||
$schema | string | the schema of the tables. Defaults to empty string, meaning the current or default schema name. |
Résultat | integer | the status of the action execution |
public actionDrop ( string $schema = '' ) : integer | ||
$schema | string | the schema of the tables. Defaults to empty string, meaning the current or default schema name. |
Résultat | integer | the status of the action execution |
public $db |