프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$db | the DB connection object or the application component ID of the DB connection. | ||
$defaultAction | |||
$migrationTable | a migration table name |
메소드 | 설명 | |
---|---|---|
actionCreate ( string $schema = '' ) : integer | Generates the 'createTable' code. | |
actionDrop ( string $schema = '' ) : integer | Generates the 'dropTable' code. | |
beforeAction ( $action ) | ||
options ( $actionID ) |
메소드 | 설명 | |
---|---|---|
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. |
리턴 | 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. |
리턴 | integer | the status of the action execution |
public $db |