2017-12-08 09:58:14 +01:00
|
|
|
defmodule Eventos.Repo.Migrations.CreateCategories do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
create table(:categories) do
|
|
|
|
add :title, :string
|
2018-01-13 23:33:03 +01:00
|
|
|
add :description, :string
|
2017-12-08 09:58:14 +01:00
|
|
|
add :picture, :string
|
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
|
|
|
|
create unique_index(:categories, [:title])
|
2018-01-13 23:33:03 +01:00
|
|
|
|
2017-12-08 09:58:14 +01:00
|
|
|
end
|
|
|
|
end
|