feat: custom field deletion
This commit is contained in:
parent
21ec86839a
commit
2af23f4042
11 changed files with 938 additions and 16 deletions
|
|
@ -0,0 +1,38 @@
|
|||
defmodule Mv.Repo.Migrations.ChangeCustomFieldDeleteCascade do
|
||||
@moduledoc """
|
||||
Updates resources based on their most recent snapshots.
|
||||
|
||||
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
drop constraint(:custom_field_values, "custom_field_values_custom_field_id_fkey")
|
||||
|
||||
alter table(:custom_field_values) do
|
||||
modify :custom_field_id,
|
||||
references(:custom_fields,
|
||||
column: :id,
|
||||
name: "custom_field_values_custom_field_id_fkey",
|
||||
type: :uuid,
|
||||
prefix: "public",
|
||||
on_delete: :delete_all
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
drop constraint(:custom_field_values, "custom_field_values_custom_field_id_fkey")
|
||||
|
||||
alter table(:custom_field_values) do
|
||||
modify :custom_field_id,
|
||||
references(:custom_fields,
|
||||
column: :id,
|
||||
name: "custom_field_values_custom_field_id_fkey",
|
||||
type: :uuid,
|
||||
prefix: "public"
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue