2018-10-11 17:37:39 +02:00
|
|
|
defmodule Mobilizon.Repo.Migrations.CreateTags do
|
2017-12-08 09:58:14 +01:00
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
create table(:tags) do
|
2019-02-22 14:18:52 +01:00
|
|
|
add(:title, :string)
|
|
|
|
add(:slug, :string, null: false)
|
2017-12-08 09:58:14 +01:00
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
|
2019-02-22 14:18:52 +01:00
|
|
|
create(unique_index(:tags, [:slug]))
|
2017-12-08 09:58:14 +01:00
|
|
|
end
|
|
|
|
end
|