ash_postgres/priv/test_repo/migrations/20210429201538_migrate_resources11.exs

25 lines
687 B
Elixir
Raw Normal View History

defmodule AshPostgres.TestRepo.Migrations.MigrateResources11 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(:post_links, primary_key: false) do
add :source_post_id,
references(:posts, column: :id, name: "post_links_source_post_id_fkey", type: :uuid),
primary_key: true
add :destination_post_id,
references(:posts, column: :id, name: "post_links_destination_post_id_fkey", type: :uuid),
primary_key: true
end
end
def down do
drop table(:post_links)
end
end