class MigrationHelper

Traits

Properties

protected Container|null $container from  HasContainer

Methods

void
setContainer(Container $container)

Set the container used for resolution.

getContainer()

Return the current container.

mixed
resolve(string $abstract)

Resolve the given type from the container.

__construct(Parser $parser, array $databaseMigrationPath, FileHelper $fileHelper, bool $disableMigrationScan, ReflectionProvider $reflectionProvider, InitializerExprTypeResolver $initializerExprTypeResolver, ConnectionConfigResolver $connectionConfigResolver)

Create a new migration helper instance.

array
initializeConnections(array $connections = [])

Apply the migrations to the schemas of the connections they run on.

aggregate(array $connections = [])

Apply the migrations to the schemas of the connections they run on, keeping the PHP files they read.

array
getMigrationFiles()

Get the migration files, in the order they run.

array
getMigrationPaths()

Get the paths migrations are discovered in, each mapped to the pattern its migration file names match, or to null for a migration file.

Details

in HasContainer at line 19
void setContainer(Container $container)

Set the container used for resolution.

Parameters

Container $container

Return Value

void

in HasContainer at line 27
Container getContainer()

Return the current container.

Return Value

Container

in HasContainer at line 35
mixed resolve(string $abstract)

Resolve the given type from the container.

Parameters

string $abstract

Return Value

mixed

at line 45
__construct(Parser $parser, array $databaseMigrationPath, FileHelper $fileHelper, bool $disableMigrationScan, ReflectionProvider $reflectionProvider, InitializerExprTypeResolver $initializerExprTypeResolver, ConnectionConfigResolver $connectionConfigResolver)

Create a new migration helper instance.

Parameters

Parser $parser
array $databaseMigrationPath
FileHelper $fileHelper
bool $disableMigrationScan
ReflectionProvider $reflectionProvider
InitializerExprTypeResolver $initializerExprTypeResolver
ConnectionConfigResolver $connectionConfigResolver

at line 68
array initializeConnections(array $connections = [])

Apply the migrations to the schemas of the connections they run on.

Parameters

array $connections

the schemas loaded from dumps, by owning connection

Return Value

array

at line 78
SchemaAggregator aggregate(array $connections = [])

Apply the migrations to the schemas of the connections they run on, keeping the PHP files they read.

Parameters

array $connections

the schemas loaded from dumps, by owning connection

Return Value

SchemaAggregator

at line 105
array getMigrationFiles()

Get the migration files, in the order they run.

Return Value

array

at line 151
array getMigrationPaths()

Get the paths migrations are discovered in, each mapped to the pattern its migration file names match, or to null for a migration file.

By default these are the paths migrate reads: those providers register through loadMigrationsFrom(), then the application's migration directory, each holding its _.php files. Configured paths replace them and are directories scanned recursively for .php files, as upstream does; see DirectoryResolver::resolve().

Return Value

array