class Illuminate / Database / Console / Migrations / MigrateCommand

MigrateCommand

Extends

Implements

Uses

Properties

protected

$signature string

The name and signature of the console command.

Default: 'migrate {--database= : The database connection to use} {--force : Force the operation to run when in production} {--path=* : The path(s) to the migrations files to be executed} {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths} {--schema-path= : The path to a schema dump file} {--pretend : Dump the SQL queries that would be run} {--seed : Indicates if the seed task should be re-run} {--seeder= : The class name of the root seeder} {--step : Force the migrations to be run so they can be rolled back individually}'
protected

$description string

The console command description.

Default: 'Run the database migrations'
protected

$migrator Migrator

The migrator instance.

Default: null
protected

$dispatcher Dispatcher

The event dispatcher instance.

Default: null

Methods

public

__construct ( Migrator $migrator , Dispatcher $dispatcher ) : void

Create a new migration command instance.

Parameters

public

handle ( ) : int

Execute the console command.

protected

prepareDatabase ( ) : void

Prepare the migration database for running.

protected

repositoryExists ( ) : bool

Determine if the migrator repository exists.

protected

createMissingSqliteDatabase ( $path ) : bool

Create a missing SQLite database.

Parameters

  • $path string
protected

createMissingMysqlDatabase ( $connection ) : bool

Create a missing MySQL database.

protected

loadSchemaState ( ) : void

Load the schema state to seed the initial database schema structure.

protected

schemaPath ( $connection ) : string

Get the path to the stored schema for the given connection.

Parameters