Models use Ecto.Migration modules as a list of schema operations.
Recognised shapes inside change/0, up/0, and down/0: create table,
create_if_not_exists table, alter table (with add, remove,
modify), drop table, create index/create_if_not_exists index
(also unique_index), drop index, rename, and execute.
Summary
Functions
Columns added to table by this migration, from create table and alter table ... add.
Whether the migration can be rolled back: it defines up and down, or a
change whose execute calls all carry a down statement.
The timestamp prefix of a migration filename, or nil.
Types
@type op() :: {:create_table, atom() | String.t(), [%{name: atom(), type: term(), opts: keyword()}]} | {:alter_table, atom() | String.t(), [ {:add, atom(), term(), keyword()} | {:remove, atom()} | {:modify, atom(), term(), keyword()} ]} | {:drop_table, atom() | String.t()} | {:create_index, atom() | String.t(), [atom()], keyword()} | {:drop_index, atom() | String.t(), keyword()} | {:rename, term()} | {:execute, :reversible | :irreversible}
One schema operation. Table and index names are atoms or strings as written.
Functions
Columns added to table by this migration, from create table and alter table ... add.
Whether the migration can be rolled back: it defines up and down, or a
change whose execute calls all carry a down statement.
The timestamp prefix of a migration filename, or nil.