mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-21 05:53:18 +12:00
21 lines
No EOL
510 B
Elixir
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 |