feat: add timestamps to paste table

Signed-off-by: Sphericalkat <amolele@gmail.com>
This commit is contained in:
sphericalkat committed 2024-05-07 01:06:18 +05:30
1 parent e1f66f9895
commit 5eb22fdb9c
1 file changed
+10
@@ -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