Migrations
extends BaseConfig
in package
Table of Contents
Properties
- $enabled : bool
- -------------------------------------------------------------------------- Enable/Disable Migrations --------------------------------------------------------------------------
- $table : string
- -------------------------------------------------------------------------- Migrations Table --------------------------------------------------------------------------
- $timestampFormat : string
- -------------------------------------------------------------------------- Timestamp Format --------------------------------------------------------------------------
Properties
$enabled
-------------------------------------------------------------------------- Enable/Disable Migrations --------------------------------------------------------------------------
public
bool
$enabled
= true
Migrations are enabled by default.
You should enable migrations whenever you intend to do a schema migration and disable it back when you're done.
$table
-------------------------------------------------------------------------- Migrations Table --------------------------------------------------------------------------
public
string
$table
= 'migrations'
This is the name of the table that will store the current migrations state. When migrations runs it will store in a database table which migration files have already been run.
$timestampFormat
-------------------------------------------------------------------------- Timestamp Format --------------------------------------------------------------------------
public
string
$timestampFormat
= 'Y-m-d-His_'
This is the format that will be used when creating new migrations using the CLI command:
php spark make:migration
NOTE: if you set an unsupported format, migration runner will not find your migration files.
Supported formats:
- YmdHis_
- Y-m-d-His_
- Y_m_d_His_