Merge branch 'develop' into feature/store-statuses-data-inside-flag
[akkoma] / priv / repo / migrations / 20191026191401_set_not_null_for_oauth_tokens.exs
1 defmodule Pleroma.Repo.Migrations.SetNotNullForOauthTokens do
2 use Ecto.Migration
3
4 # modify/3 function will require index recreation, so using execute/1 instead
5
6 def up do
7 execute("ALTER TABLE oauth_tokens
8 ALTER COLUMN app_id SET NOT NULL")
9 end
10
11 def down do
12 execute("ALTER TABLE oauth_tokens
13 ALTER COLUMN app_id DROP NOT NULL")
14 end
15 end