MigrationInterface
in
The MigrationInterface defines the minimum set of methods to be implemented by a database migration.
Each migration class should provide the [[up()]] method containing the logic for "upgrading" the database and the [[down()]] method for the "downgrading" logic.
Tags
Table of Contents
Methods
- down() : bool
- This method contains the logic to be executed when removing this migration.
- up() : bool
- This method contains the logic to be executed when applying this migration.
Methods
down()
This method contains the logic to be executed when removing this migration.
public
down() : bool
The default implementation throws an exception indicating the migration cannot be removed.
Return values
bool —return a false value to indicate the migration fails and should not proceed further. All other return values mean the migration succeeds.
up()
This method contains the logic to be executed when applying this migration.
public
up() : bool
Return values
bool —return a false value to indicate the migration fails and should not proceed further. All other return values mean the migration succeeds.