projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add migration for counter_cache table update
[akkoma]
/
priv
/
repo
/
migrations
/
20191006135457_move_keys_to_separate_column.exs
1
defmodule Pleroma.Repo.Migrations.MoveKeysToSeparateColumn do
2
use Ecto.Migration
3
4
def change do
5
execute(
6
"update users set keys = info->>'keys' where local",
7
"update users set info = jsonb_set(info, '{keys}'::text[], to_jsonb(keys)) where local"
8
)
9
end
10
end