defmodule AshPostgres.TestRepo.TenantMigrations.MigrateResources3 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_posts, prefix: prefix()) do modify :id, :uuid, default: fragment("uuid_generate_v4()") modify :org_id, references(:multitenant_orgs, type: :uuid, column: :id, prefix: "public", name: "multitenant_posts_org_id_fkey" ) end end def down do alter table(:multitenant_posts, prefix: prefix()) do modify :org_id, references(:multitenant_orgs, type: :binary_id, column: :id, prefix: "public", name: "multitenant_posts_org_id" ) modify :id, :binary_id, default: nil end end end