projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
04e5ad1e2d7f3fcaacdca6b437073367feb8680d
[akkoma]
/
migrations
/
20200401030751_users_add_public_key.exs
1
defmodule Pleroma.Repo.Migrations.UsersAddPublicKey do
2
use Ecto.Migration
3
4
def up do
5
alter table(:users) do
6
add_if_not_exists(:public_key, :text)
7
end
8
9
execute("UPDATE users SET public_key = source_data->'publicKey'->>'publicKeyPem'")
10
end
11
12
def down do
13
alter table(:users) do
14
remove_if_exists(:public_key, :text)
15
end
16
end
17
end