chiya/priv/repo/migrations/20230305171255_create_channels_notes.exs

14 lines
384 B
Elixir
Raw Permalink Normal View History

2023-03-05 18:14:06 +01:00
defmodule Chiya.Repo.Migrations.CreateChannelsNotes do
use Ecto.Migration
def change do
create table(:channels_notes, primary_key: false) do
add :channel, references(:channels, on_delete: :delete_all)
add :note, references(:notes, on_delete: :delete_all)
2023-03-05 18:14:06 +01:00
end
create index(:channels_notes, [:channel])
create index(:channels_notes, [:note])
end
end