Lotus.Migration behaviour (Lotus v0.15.0)

Copy Markdown View Source

Migration behavior for database-specific migrations.

Defines the interface that each database adapter's migration module must implement.

Summary

Callbacks

Run the down migrations.

Check the latest version the database is migrated to.

Run the up migrations.

Callbacks

down(t)

@callback down(Keyword.t()) :: :ok

Run the down migrations.

migrated_version(t)

@callback migrated_version(Keyword.t()) :: non_neg_integer()

Check the latest version the database is migrated to.

up(t)

@callback up(Keyword.t()) :: :ok

Run the up migrations.