class MigrationCache

Constants

private CACHE_PREFIX

private CACHE_FORMAT_VERSION

Bump when the serialized entry, SchemaConnection/SchemaTable/SchemaColumn or the aggregation logic changes.

Methods

__construct(ConnectionConfigResolver $connectionConfigResolver, string $cacheDirectory, bool $enabled = false)

Create a new migration cache instance.

array
remember(array $migrationFiles, array $schemaFiles, array $configuration, callable $callback)

Get the schema aggregated from the given inputs, with the PHP files besides the migrations it was read from that are not one table's sources, aggregating and storing it when it is not cached.

Details

at line 52
__construct(ConnectionConfigResolver $connectionConfigResolver, string $cacheDirectory, bool $enabled = false)

Create a new migration cache instance.

Parameters

ConnectionConfigResolver $connectionConfigResolver
string $cacheDirectory
bool $enabled

at line 76
array remember(array $migrationFiles, array $schemaFiles, array $configuration, callable $callback)

Get the schema aggregated from the given inputs, with the PHP files besides the migrations it was read from that are not one table's sources, aggregating and storing it when it is not cached.

Migrations read connection names from config keys and declarations from PHP files that are known only once they are aggregated, so an entry records those keys' states and the files' contents, and is used only while they are the same.

Parameters

array $migrationFiles
array $schemaFiles
array $configuration

the normalized configuration the aggregation reads

callable $callback

Return Value

array