katbin/priv/repo/migrations/20240507005300_add_timestamps_pastes.exs
Sphericalkat 5eb22fdb9c
feat: add timestamps to paste table
Signed-off-by: Sphericalkat <amolele@gmail.com>
2024-05-07 01:06:18 +05:30

11 lines
325 B
Elixir

defmodule Ketbin.Repo.Migrations.AddTimestampsPastes do
use Ecto.Migration
def change do
alter table(:pastes) do
add :inserted_at, :naive_datetime, null: false, default: fragment("CURRENT_TIMESTAMP")
add :updated_at, :naive_datetime, null: false, default: fragment("CURRENT_TIMESTAMP")
end
end
end