Migrations must implement this.
Migration files must be contained in their own directory. The default directory is migrations/default/
Migration files must be named <SEQUENCE>.php
, where SEQUENCE
is a non-zero ascending identifier. The file must return
an instance of this interface (e.g. an anonymous class).
Good practice is to have file names start with an ISO/UTC datetime, followed by a description of what they do.
Migrations are given the Schema helper, but can directly execute SQL if needed.
Each migration is performed within a transaction savepoint.
See the test migrations in test/migrations/default/
, and the migration helper script in bin/
Public Methods | |
void | down ($schema) |
void | up ($schema) |
void down | ( | $schema | ) |
Schema | $schema |
void up | ( | $schema | ) |
Schema | $schema |