PoppyMigrateResetCommand
class PoppyMigrateResetCommand extends Command
Poppy Migrate Reset
Traits
Properties
protected string | $name | The console command name. |
|
protected string | $description | The console command description. |
|
protected Poppy | $poppy | ||
protected Migrator | $migrator | ||
protected Filesystem | $files |
Methods
Require (once) all migration files for the supplied module.
Execute the console command.
Run the migration reset for the current list of slugs.
Run "down" a migration instance.
Generate a list of all migration paths, given the arguments/operations supplied.
Using the arguments, generate a list of slugs to reset the migrations for.
Determine if a valid slug has been provided as an argument.
Get the console command parameters.
Get the console command arguments.
Get the console command options.
Details
in
MigrationTrait at line 18
protected
requireMigrations(string $module)
Require (once) all migration files for the supplied module.
in
MigrationTrait at line 36
protected string
getMigrationPath(string $module)
Get migration directory path.
at line 58
__construct(Poppy $poppy, Filesystem $files, Migrator $migrator)
Create a new command instance.
at line 70
handle()
Execute the console command.
at line 85
protected
reset()
Run the migration reset for the current list of slugs.
Migrations should be reset in the reverse order that they were migrated up as. This ensures the database is properly reversed without conflict.
at line 121
protected
runDown(string $file, string|object $migration)
Run "down" a migration instance.
at line 137
protected array
getMigrationPaths()
Generate a list of all migration paths, given the arguments/operations supplied.
at line 154
protected Collection|array
getSlugsToReset()
Using the arguments, generate a list of slugs to reset the migrations for.
at line 172
protected bool
validSlugProvided()
Determine if a valid slug has been provided as an argument.
We will accept a slug as long as it is not empty and is enabled (or force is passed).
at line 194
protected array
getParameters(string $slug)
Get the console command parameters.
at line 219
protected array
getArguments()
Get the console command arguments.
at line 230
protected array
getOptions()
Get the console command options.