Updater
Database updater
class Winter\Storm\Database\Updater
Executes database migration and seed scripts based on their filename.
Properties
protected
static
$migrationCache
:
array
= []
Local cache of migration file paths to support anonymous migrations [$path => $anonInstance || $className]
Methods
public getClassFromFile (string $file) : string | false
Extracts the namespace and class name from a file.
Parameters
Property | Type | Description |
---|---|---|
$file | string |
string
|
Returns
string | false
public packDown ($file)
Packs down a migration or seed file.
Parameters
Property | Type | Description |
---|---|---|
$file | mixed |
mixed
|
Returns
mixed
public resolve (string $file) : object | null
Resolve a migration instance from a file.
Parameters
Property | Type | Description |
---|---|---|
$file | string |
string
|
Returns
object | null
public setUp ($file)
Sets up a migration or seed file.
Parameters
Property | Type | Description |
---|---|---|
$file | mixed |
mixed
|
Returns
mixed
protected isValidScript ($object, $file)
Checks if the object is a valid update script.
Parameters
Property | Type | Description |
---|---|---|
$object | mixed |
mixed
|
$file | mixed |
mixed
|
Returns
mixed
← Previous page
Winter\Storm\Database\TreeCollection
Next page →
Winter\Storm\Database\Updates\Migration
Copyright © 2024 Winter CMS