ash_postgres/priv/test_repo/migrations/20240627223225_migrate_resources31.exs
2024-07-01 21:34:47 -04:00

31 lines
675 B
Elixir

defmodule AshPostgres.TestRepo.Migrations.MigrateResources31 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
alter table(:multitenant_orgs) do
add(
:owner_id,
references(:users,
column: :id,
name: "multitenant_orgs_owner_id_fkey",
type: :uuid,
prefix: "public"
)
)
end
end
def down do
drop(constraint(:multitenant_orgs, "multitenant_orgs_owner_id_fkey"))
alter table(:multitenant_orgs) do
remove(:owner_id)
end
end
end