Migration
abstract class Migration
Supports database migration operations.
Properties
| protected DB | $_db | Database instance. |
|
| protected array<string,string> | $_columnTypesMap | Maps column types to blueprint methods. |
Methods
__construct()
Creates instance of Migration class.
void
aclSetup(string $table)
Setup acl table's initial fields during first db migration.
static int
getNextBatch()
Get value for batch field for next set of migrations.
void
down()
Rollback the migration.
void
up()
Execute the migration.
Details
at line 35
__construct()
Creates instance of Migration class.
at line 46
void
aclSetup(string $table)
Setup acl table's initial fields during first db migration.
at line 58
static int
getNextBatch()
Get value for batch field for next set of migrations.
at line 67
abstract void
down()
Rollback the migration.
at line 79
protected Blueprint
schema(string $table)
Returns a new Blueprint instance for the specified table.
This method is used to define or modify the structure of a database table.
It provides an entry point to schema-building methods such as id(),
string(), timestamps(), etc.
at line 86
abstract void
up()
Execute the migration.