interface MigrationInterface (View source)

Contract for a one-way database migration.

The identifier gives a migration its stable identity and determines its execution order. The migration applies its schema changes through the existing Schema API.

Methods

static string

Returns a stable YYYYMMDDHHMMSS_description identifier.

string
void
up(Schema $schema)

Applies the schema change.

void

Details

identifier

static string identifier()

Returns a stable YYYYMMDDHHMMSS_description identifier.

An identifier must not change after the migration has been applied.

Return Value

string

up

void up(Schema $schema)

Applies the schema change.

The framework does not provide automatic rollback or guarantee DDL atomicity.

Parameters

Schema $schema

Return Value

void