Lotus.Migrations (Lotus v0.2.0)
View SourceMigration management system for Lotus.
Handles versioned schema migrations for the Lotus query storage system. Dispatches to database-specific migration modules based on the configured adapter.
Usage
In your application migration:
defmodule MyApp.Repo.Migrations.CreateLotusQueries do
use Ecto.Migration
def up do
Lotus.Migrations.up()
end
def down do
Lotus.Migrations.down()
end
end
Summary
Functions
Run the down changes for migrations.
Check the latest version the database is migrated to.
Run the up changes for migrations.
Functions
Run the down changes for migrations.
Examples
Run migrations down:
Lotus.Migrations.down()
Run migrations in an alternate prefix:
Lotus.Migrations.down(prefix: "analytics")
Check the latest version the database is migrated to.
Example
Lotus.Migrations.migrated_version()
Run the up changes for migrations.
Examples
Run all migrations:
Lotus.Migrations.up()
Run migrations in an alternate prefix:
Lotus.Migrations.up(prefix: "analytics")