Creates and drops Licet's tables.
mix licet.gen.migration generates an Ecto migration that calls this module:
defmodule Licet.Repo.Migrations.InstallLicet do
use Ecto.Migration
def up, do: Licet.Migration.up(prefix: "licet")
def down, do: Licet.Migration.down(prefix: "licet")
endThe tables live in their own Postgres schema, named by :prefix. The
statements use IF NOT EXISTS, so running up/1 twice is harmless. In tests,
Licet.Testing.migrate!/2 runs the same statements without a migration.
Summary
Functions
Drops the prefix's Postgres schema and every table in it. Call it from an
Ecto migration's down/0.
Returns the source of an Ecto migration module, as written by
mix licet.gen.migration.
Returns the SQL statements that create the tables in a prefix.
Creates the tables. Call it from an Ecto migration's up/0.
Functions
@spec down(keyword()) :: :ok
Drops the prefix's Postgres schema and every table in it. Call it from an
Ecto migration's down/0.
Options
:prefix- the Postgres schema to drop. Defaults to"licet".
Returns the source of an Ecto migration module, as written by
mix licet.gen.migration.
Options
:prefix- the Postgres schema for the tables. Defaults to"licet".:module- the migration module name. Defaults to"Licet.Repo.Migrations.InstallLicet".
Returns the SQL statements that create the tables in a prefix.
Takes a prefix string or a keyword list with :prefix, which defaults to
"licet".
@spec up(keyword()) :: :ok
Creates the tables. Call it from an Ecto migration's up/0.
Options
:prefix- the Postgres schema for the tables. Defaults to"licet".