live_beats/priv/repo/migrations/20210908150612_create_genres.exs
2021-10-29 12:12:23 -04:00

13 lines
296 B
Elixir

defmodule LiveBeats.Repo.Migrations.CreateGenres do
use Ecto.Migration
def change do
create table(:genres) do
add :title, :text, null: false
add :slug, :text, null: false
end
create unique_index(:genres, [:title])
create unique_index(:genres, [:slug])
end
end