defmodule AshPostgres.TestRepo.TenantMigrations.MigrateResources1 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 create table(:multitenant_posts, primary_key: false, prefix: prefix()) do add :id, :binary_id, null: false, default: fragment("uuid_generate_v4()"), primary_key: true add :org_id, references("multitenant_orgs", type: :binary_id, column: :id, name: "#{prefix()}_multitenant_orgs_org_id_fkey", prefix: "public" ) add :name, :text end end def down do drop table("multitenant_posts", prefix: prefix()) end end