feat: add timestamps to paste table

Signed-off-by: Sphericalkat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2024-05-07 01:06:18 +05:30
parent e1f66f9895
commit 5eb22fdb9c
Signed by: sphericalkat
GPG Key ID: 1C022B9CED2425B4

View File

@ -0,0 +1,10 @@
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