ash_postgres/priv/test_repo/migrations/20240906170759_migrate_resources38.exs

34 lines
800 B
Elixir
Raw Normal View History

defmodule AshPostgres.TestRepo.Migrations.MigrateResources38 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_permalinks, primary_key: false) do
add(:id, :uuid, null: false, default: fragment("gen_random_uuid()"), primary_key: true)
add(
:post_id,
references(:posts,
column: :id,
name: "post_permalinks_post_id_fkey",
type: :uuid,
prefix: "public",
on_delete: :nothing
),
null: false
)
end
end
def down do
drop(constraint(:post_permalinks, "post_permalinks_post_id_fkey"))
drop(table(:post_permalinks))
end
end