memEx/priv/repo/migrations/20221126182210_use_slugs.exs

15 lines
363 B
Elixir
Raw Normal View History

2022-11-26 14:51:18 -05:00
defmodule Memex.Repo.Migrations.UseSlugs do
use Ecto.Migration
def change do
rename table(:notes), :title, to: :slug
create unique_index(:notes, [:slug])
rename table(:contexts), :title, to: :slug
create unique_index(:contexts, [:slug])
rename table(:pipelines), :title, to: :slug
create unique_index(:pipelines, [:slug])
end
end