Versioned migrations for PhoenixLiveCalendar's Ecto persistence layer.
Follows the Oban pattern: consumers generate a migration that delegates to this module, allowing PhoenixLiveCalendar to manage schema changes across versions without consumers modifying their migrations.
Usage
Generate a migration:
mix ecto.gen.migration add_phoenix_live_calendarThen edit it:
defmodule MyApp.Repo.Migrations.AddPhoenixLiveCalendar do
use Ecto.Migration
def up, do: PhoenixLiveCalendar.Store.Ecto.Migrations.up(version: 1)
def down, do: PhoenixLiveCalendar.Store.Ecto.Migrations.down(version: 1)
endOptions
:version— Target migration version (default: latest):prefix— PostgreSQL schema prefix for multi-tenant (default: "public")
Summary
Functions
Returns the current migration version.
Rolls back migrations down to the specified version.
Runs migrations up to the specified version.