live_beats/priv/repo/migrations/20210908150612_create_genres.exs

14 lines
296 B
Elixir
Raw Normal View History

2021-10-27 20:02:56 +00:00
defmodule LiveBeats.Repo.Migrations.CreateGenres do
use Ecto.Migration
def change do
create table(:genres) do
add :title, :text, null: false
2021-10-29 16:12:23 +00:00
add :slug, :text, null: false
2021-10-27 20:02:56 +00:00
end
2021-10-29 16:12:23 +00:00
create unique_index(:genres, [:title])
create unique_index(:genres, [:slug])
2021-10-27 20:02:56 +00:00
end
end