Ecto.Migration.create
You're seeing just the function
create
, go back to Ecto.Migration module for more information.
Creates one of the following:
- an index
- a table with only the :id primary key
- a constraint
When reversing (in a change/0
running backwards), indexes are only dropped
if they exist, and no errors are raised. To enforce dropping an index, use
drop/1
.
Examples
create index("posts", [:name])
create table("version")
create constraint("products", "price_must_be_positive", check: "price > 0")