Hi!
When setting up a migration, I need to specify the foreign key constraint, ON UPDATE -> CASCADE (MySQL). I’ve read the documentation, whoever there is only mention to the on_delete constraint. Using, on_replace, or on_cascade doesn’t work. Is this method implemented?
def change do
create table(:user_exam) do
add :user_id, references(:user, on_delete: :nothing, on_cascade: :update), null: false
add :exam_id, references(:exam, on_delete: :nothing, on_cascade: :update), null: false
add :level, :integer, null: false
timestamps()
end
create unique_index(:user_exam, [:user_id, :exam_id])
create index(:user_exam, [:user_id])
create index(:user_exam, [:exam_id])
end