debianize-mobilizon/priv/repo/migrations/20171207162756_create_categories.exs

15 lines
265 B
Elixir
Raw Normal View History

defmodule Eventos.Repo.Migrations.CreateCategories do
use Ecto.Migration
def change do
create table(:categories) do
add :title, :string
add :picture, :string
timestamps()
end
create unique_index(:categories, [:title])
end
end