Fuel Documentation

Migrate Class

The migrate class allows you to run, walk through and revert Migrations from your controllers.

current()

Runs the up and down methods to the migration currently set in the migration config.

Static Yes
Parameters None
Returns bool
Example
Migrate::current();

latest()

Runs up methods for ever migration between the current version and the last in the migrations folder.

Static Yes
Parameters None
Returns boolean
Example
Migrate::latest();

version($version)

The version method will move the migrations up or down to set the schema at a specific migration.

Static Yes
Parameters
Param Default Description
$version required The version you are migrating to.
Returns mixed - Dependent on the $return_type.
Example
Event::trigger('user_login', $data)