PHP Class jamband\schemadump\SchemaDumpController

Inheritance: extends yii\console\Controller
Afficher le fichier Open project: jamband/yii2-schemadump

Méthodes publiques

Свойство Type Description
$db the DB connection object or the application component ID of the DB connection.
$defaultAction
$migrationTable a migration table name

Méthodes publiques

Méthode Description
actionCreate ( string $schema = '' ) : integer Generates the 'createTable' code.
actionDrop ( string $schema = '' ) : integer Generates the 'dropTable' code.
beforeAction ( $action )
options ( $actionID )

Private Methods

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

Method Details

actionCreate() public méthode

Generates the 'createTable' code.
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

actionDrop() public méthode

Generates the 'dropTable' code.
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

beforeAction() public méthode

public beforeAction ( $action )

options() public méthode

public options ( $actionID )

Property Details

$db public_oe property

the DB connection object or the application component ID of the DB connection.
public $db

$defaultAction public_oe property

public $defaultAction

$migrationTable public_oe property

a migration table name
public $migrationTable