29 lines
644 B
Elixir
29 lines
644 B
Elixir
defmodule Mixer.Repo.Migrations.AddTimestampsToTweets 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
|
|
alter table(:tweets) do
|
|
add :inserted_at, :utc_datetime_usec,
|
|
null: false,
|
|
default: fragment("(now() AT TIME ZONE 'utc')")
|
|
|
|
add :updated_at, :utc_datetime_usec,
|
|
null: false,
|
|
default: fragment("(now() AT TIME ZONE 'utc')")
|
|
end
|
|
end
|
|
|
|
def down do
|
|
alter table(:tweets) do
|
|
remove :updated_at
|
|
remove :inserted_at
|
|
end
|
|
end
|
|
end
|