mix.exs: bump version to 1.1.6
[akkoma] / priv / repo / migrations / 20190711042020_fix_and_secure_user_info_field.exs
1 defmodule Pleroma.Repo.Migrations.FixAndSecureUserInfoField do
2 use Ecto.Migration
3
4 def up do
5 execute("UPDATE users SET info = '{}'::jsonb WHERE info IS NULL")
6
7 execute("ALTER TABLE users
8 ALTER COLUMN info SET NOT NULL
9 ")
10 end
11
12 def down do
13 execute("ALTER TABLE users
14 ALTER COLUMN info DROP NOT NULL
15 ")
16 end
17 end