Skip to content

Commit

Permalink
feat: add timestamps to paste table
Browse files Browse the repository at this point in the history
Signed-off-by: Sphericalkat <[email protected]>
  • Loading branch information
SphericalKat committed May 6, 2024
1 parent e1f66f9 commit 5eb22fd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions priv/repo/migrations/20240507005300_add_timestamps_pastes.exs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5eb22fd

Please sign in to comment.