Attempt at adding a last active field to tokens

This commit is contained in:
Henry Jameson 2026-11-06 18:59:56 +02:00
commit a06e471db7
6 changed files with 26 additions and 1 deletions

View file

@ -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

View 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