Attempt at adding a last active field to tokens
This commit is contained in:
parent
ab8fae0b94
commit
a06e471db7
6 changed files with 26 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ defmodule Pleroma.Repo.Migrations.CreateOAuthToken do
|
|||
add(:token, :string)
|
||||
add(:refresh_token, :string)
|
||||
add(:valid_until, :naive_datetime_usec)
|
||||
add(:last_active, :naive_datetime_usec)
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
|
|
|||
13
priv/repo/migrations/202611061856_add_token_activity.exs
Normal file
13
priv/repo/migrations/202611061856_add_token_activity.exs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Repo.Migrations.AddTokenActivity do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:oauth_tokens) do
|
||||
add_if_not_exists(:last_active, :naive_datetime_usec)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue