Many-to-many between performers and performances.

This commit is contained in:
codevictory
2021-04-03 21:47:24 +03:00
parent 05eeb8cbf4
commit 07e475b111
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
defmodule Runosaari.Repo.Migrations.CreatePerformerPerformance do
use Ecto.Migration
def change do
create table(:performer_performance, primary_key: false) do
add :performer_id, references(:performers, on_delete: :nothing), primary_key: true
add :performance_id, references(:performances, on_delete: :nothing), primary_key: true
end
create index(:performer_performance, [:performer_id])
create index(:performer_performance, [:performance_id])
end
end