# `Bandera.Ecto.Migrations`

Helpers for creating the Bandera flags table. Call from your own migration:

    defmodule MyApp.Repo.Migrations.CreateBanderaFlags do
      use Ecto.Migration
      def up, do: Bandera.Ecto.Migrations.up()
      def down, do: Bandera.Ecto.Migrations.down()
    end

The table name is read at runtime from `config :bandera, persistence: [ecto_table_name: ...]`
(default `"bandera_flags"`), so it is never fixed at compile time.

# `down`

```elixir
@spec down() :: :ok
```

Drops the flags table. Call from the `down/0` of your own migration.

# `up`

```elixir
@spec up() :: :ok
```

Creates the flags table and its unique index (idempotently).

Call from the `up/0` of your own migration. The table name is read at runtime
from `Bandera.Config.ecto_table_name/0`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
