2018-10-11 17:37:39 +02:00
|
|
|
defmodule Mobilizon.Repo.Migrations.CreateCategories do
|
2017-12-08 09:58:14 +01:00
|
|
|
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
|