Property | Type | Description | |
---|---|---|---|
$commonTables | array | List of the tables that are commonly found in the dump schema and the current schema | |
$currentSchema | array | Array of \Cake\Database\Schema\Table objects from the current state of the database | |
$dumpSchema | array | Array of \Cake\Database\Schema\Table objects from the dump file which represents the state of the database after the last migrate / rollback command | |
$migratedItems | array | Array of migrations that have already been migrated | |
$migrationsFiles | array | Migration files that are stored in the self::migrationsPath | |
$migrationsPath | string | Path to the migration files | |
$phinxTable | string | Name of the phinx log table | |
$tables | array | List the tables the connection currently holds | |
$templateData | {@inheritDoc} |
Method | Description | |
---|---|---|
bake ( $name ) | {@inheritDoc} | |
getCollection ( string $connection ) : Cake\Database\Schema\Collection | Get a collection from a database. | |
getOptionParser ( ) : Cake\Console\ConsoleOptionParser | Gets the option parser instance and configures it. | |
setup ( ) : void | Sets up everything the baking process needs | |
template ( ) | {@inheritDoc} | |
templateData ( ) : array | Process and prepare the data needed for the bake template to be generated. |
Method | Description | |
---|---|---|
bakeSnapshot ( $name ) : integer | Fallback method called to bake a snapshot when the phinx log history is empty and there are no migration files. | |
calculateDiff ( ) : void | This methods runs the various methods needed to calculate a diff between the current state of the database and the schema dump file. | |
checkSync ( ) : boolean | Checks that the migrations history is in sync with the migrations files | |
getColumns ( ) : void | Calculate the diff between columns in existing tables. | |
getConstraints ( ) : void | Calculate the diff between contraints in existing tables. | |
getCurrentSchema ( ) : array | Reflects the current database schema. | |
getDumpSchema ( ) : array | Fetch the correct schema dump based on the arguments and options passed to the shell call and returns it as an array | |
getIndexes ( ) : void | Calculate the diff between indexes in existing tables. | |
getTables ( ) : void | Calculate the diff between the current state of the database and the schema dump by returning an array containing the full \Cake\Database\Schema\Table definitions of tables to be created and removed in the diff file. |
protected bakeSnapshot ( $name ) : integer | ||
return | integer | Value of the snapshot baking dispatch process |
protected calculateDiff ( ) : void | ||
return | void |
public getCollection ( string $connection ) : Cake\Database\Schema\Collection | ||
$connection | string | Database connection name. |
return | Cake\Database\Schema\Collection |
protected getColumns ( ) : void | ||
return | void |
protected getConstraints ( ) : void | ||
return | void |
protected getCurrentSchema ( ) : array | ||
return | array | Full database schema : the key is the name of the table and the value is an instance of \Cake\Database\Schema\Table. |
protected getDumpSchema ( ) : array | ||
return | array | Full database schema : the key is the name of the table and the value is an instance of \Cake\Database\Schema\Table. |
protected getIndexes ( ) : void | ||
return | void |
public getOptionParser ( ) : Cake\Console\ConsoleOptionParser | ||
return | Cake\Console\ConsoleOptionParser |
public templateData ( ) : array | ||
return | array |
protected array $commonTables | ||
return | array |
protected array $currentSchema | ||
return | array |
protected array $dumpSchema | ||
return | array |
protected array $migratedItems | ||
return | array |
protected array $migrationsFiles | ||
return | array |
protected string $migrationsPath | ||
return | string |
protected string $phinxTable | ||
return | string |
protected array $tables | ||
return | array |