class PoppyMigrateCommand extends Command

Poppy Migrate

Traits

ConfirmableTrait
MigrationTrait

Properties

protected string $name

The console command name.

protected string $description

The console command description.

protected Poppy $poppy
protected Migrator $migrator

Methods

requireMigrations(string $module)

Require (once) all migration files for the supplied module.

string
getMigrationPath(string $module)

Get migration directory path.

__construct(Migrator $migrator, Poppy $poppy)

Create a new command instance.

null|void
handle()

Execute the console command.

null
migrate(string $slug)

Run migrations for the specified module.

prepareDatabase()

Prepare the migration database for running.

array
getArguments()

Get the console command arguments.

array
getOptions()

Get the console command options.

Details

in MigrationTrait at line 18
protected requireMigrations(string $module)

Require (once) all migration files for the supplied module.

Parameters

string $module module

in MigrationTrait at line 36
protected string getMigrationPath(string $module)

Get migration directory path.

Parameters

string $module module

Return Value

string

at line 52
__construct(Migrator $migrator, Poppy $poppy)

Create a new command instance.

Parameters

Migrator $migrator
Poppy $poppy

at line 64
null|void handle()

Execute the console command.

Return Value

null|void

at line 111
protected null migrate(string $slug)

Run migrations for the specified module.

Parameters

string $slug slug

Return Value

null

at line 155
protected prepareDatabase()

Prepare the migration database for running.

at line 170
protected array getArguments()

Get the console command arguments.

Return Value

array

at line 181
protected array getOptions()

Get the console command options.

Return Value

array