MigrateFreshCommand
- Full name:
\Codefy\Framework\Console\Commands\MigrateFreshCommand - Parent class:
\Codefy\Framework\Console\Commands\PhpMigCommand - This class is marked as final and can't be subclassed
- This class is a Final class
Properties
name
Methods
configure
Configure commands.
handle
dropAllTables
Drop all tables using PDO (driver-aware)
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pdo | \PDO |
dropMySqlTables
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pdo | \PDO |
dropPostgresTables
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pdo | \PDO |
dropSqliteTables
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pdo | \PDO |
Inherited methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$codefy | \Codefy\Framework\Application |
configure
Configure commands.
execute
protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input | \Symfony\Component\Console\Input\InputInterface | |
$output | \Symfony\Component\Console\Output\OutputInterface |
Throws:
getArgument
Returns the argument value for the given argument name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$key | string|null |
getOptions
Returns the option value for the given option name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$key | string|null |
terminalRaw
Outputs the string to the console without any tag.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$string | string |
terminalInfo
Output to the terminal wrap in info tags.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$string | string |
terminalComment
Output to the terminal wrap in comment tags.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$string | string |
terminalQuestion
Output to the terminal wrap in question tags.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$string | string |
terminalError
Output to the terminal wrap in error tags.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$string | string |
terminalNewLine
Output to the terminal with a blank line.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$count | int |
confirm
Parameters:
| Parameter | Type | Description |
|---|---|---|
$question | string |
ask
Parameters:
| Parameter | Type | Description |
|---|---|---|
$question | string | |
$default | bool|float|int|string|null |
choice
protected choice(string $question, (string|bool|int|float|\Stringable)[] $choices, bool|float|int|string|null $default = null, string|null $message = null): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$question | string | |
$choices | (string|bool|int|float|\Stringable)[] | |
$default | bool|float|int|string|null | |
$message | string|null |
multiChoice
protected multiChoice(string $question, (string|bool|int|float|\Stringable)[] $choices, bool|float|int|string|null $default = null, string|null $message = null): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$question | string | |
$choices | (string|bool|int|float|\Stringable)[] | |
$default | bool|float|int|string|null | |
$message | string|null |
resolveCommand
Resolve the console command instance for the given command.
protected resolveCommand(\Symfony\Component\Console\Command\Command|string $command): \Symfony\Component\Console\Command\Command
Parameters:
| Parameter | Type | Description |
|---|---|---|
$command | \Symfony\Component\Console\Command\Command|string |
call
Call another console command.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$command | \Symfony\Component\Console\Command\Command|string | |
$arguments | array |
Throws:
option
Get the value of a command option.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$key | string|null |
options
Get all the options passed to the command.
runCommand
Run the given console command.
protected runCommand(\Symfony\Component\Console\Command\Command|string $command, array $arguments, \Symfony\Component\Console\Output\OutputInterface $output): int
Parameters:
| Parameter | Type | Description |
|---|---|---|
$command | \Symfony\Component\Console\Command\Command|string | |
$arguments | array | |
$output | \Symfony\Component\Console\Output\OutputInterface |
Throws:
createInputFromArguments
Create an input instance from the given arguments.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$arguments | array |
context
Get all the context passed to the command.
bootstrap
Bootstrap migration.
protected bootstrap(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input | \Symfony\Component\Console\Input\InputInterface | |
$output | \Symfony\Component\Console\Output\OutputInterface |
Throws:
findBootstrapFile
Parameters:
| Parameter | Type | Description |
|---|---|---|
$filename | string|null |
bootstrapObjectMap
bootstrapAdapter
protected bootstrapAdapter(\Symfony\Component\Console\Input\InputInterface $input): \Qubus\Expressive\Migration\Adapter\MigrationAdapter
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input | \Symfony\Component\Console\Input\InputInterface |
Throws:
bootstrapMigrations
protected bootstrapMigrations(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): array
Parameters:
| Parameter | Type | Description |
|---|---|---|
$input | \Symfony\Component\Console\Input\InputInterface | |
$output | \Symfony\Component\Console\Output\OutputInterface |
Throws:
bootstrapMigrator
protected bootstrapMigrator(\Symfony\Component\Console\Output\OutputInterface $output): \Qubus\Expressive\Migration\Migrator
Parameters:
| Parameter | Type | Description |
|---|---|---|
$output | \Symfony\Component\Console\Output\OutputInterface |
setBootstrap
Set bootstrap.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$bootstrap | string |
getBootstrap
Get bootstrap
setMigrations
Set migrations
Parameters:
| Parameter | Type | Description |
|---|---|---|
$migrations | array |
getMigrations
Get migrations.
setObjectMap
Set objectmap.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$objectmap | \ArrayAccess |
getObjectMap
Get objectmap.
setAdapter
Set adapter.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$adapter | \Qubus\Expressive\Migration\Adapter\MigrationAdapter |
getAdapter
Get Adapter
migrationToClassName
Transform create_table_user to CreateTableUser
Parameters:
| Parameter | Type | Description |
|---|---|---|
$migrationName | mixed |
Throws: