Class Misago\ActiveRecord\Migration

Handles database migrations.

IMPROVE: Instead of storing the last migration runned, store each one.

Protected instance attributes

Methods

Public static methods

get_version()

Returns the timestamp of the last migration runned.

migrations()

Returns the full list of migrations.

run($migration, $direction='up')

Runs a particular migration.

save_version($version)

Saves a timestamp as last runned migration.

Public instance methods

__construct($version)

announce($message)

Displays a message to the end-user.

migrate($direction)

Runs migration in the given direction (either up or down).