Add option to modify HTTP pool size
[akkoma] / priv / repo / migrations / 20201217172858_data_migration_prolong_o_auth_tokens_valid_until.exs
1 defmodule Pleroma.Repo.Migrations.DataMigrationProlongOAuthTokensValidUntil do
2 use Ecto.Migration
3
4 def up do
5 expires_in = Pleroma.Config.get!([:oauth2, :token_expires_in])
6 valid_until = NaiveDateTime.add(NaiveDateTime.utc_now(), expires_in, :second)
7 execute("update oauth_tokens set valid_until = '#{valid_until}'")
8 end
9
10 def down do
11 :noop
12 end
13 end