ash_postgres/priv/test_repo/migrations/20230905050351_add_post_views.exs

21 lines
No EOL
510 B
Elixir

defmodule AshPostgres.TestRepo.Migrations.AddPostViews 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_views, primary_key: false) do
add :time, :utc_datetime_usec, null: false, default: fragment("now()")
add :browser, :text
add :post_id, :uuid, null: false
end
end
def down do
drop table(:post_views)
end
end