ash_postgres/priv/test_repo/tenant_migrations/20210421172449_migrate_resources4.exs

37 lines
1,012 B
Elixir
Raw Normal View History

2021-04-22 05:49:53 +12:00
defmodule AshPostgres.TestRepo.TenantMigrations.MigrateResources4 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(:multitenant_posts, "multitenant_posts_org_id_fkey")
alter table(:multitenant_posts, prefix: prefix()) do
modify :org_id,
references(:multitenant_orgs,
column: :id,
prefix: "public",
name: "multitenant_posts_org_id_fkey",
type: :uuid
)
end
end
def down do
drop constraint(:multitenant_posts, "multitenant_posts_org_id_fkey")
alter table(:multitenant_posts, prefix: prefix()) do
modify :org_id,
references(:multitenant_orgs,
column: :id,
prefix: "public",
name: "multitenant_posts_org_id_fkey",
type: :uuid
)
end
end
end