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
/
20191104133100_set_visible_service_actors.exs
1
defmodule Pleroma.Repo.Migrations.SetVisibleServiceActors do
2
use Ecto.Migration
3
import Ecto.Query
4
alias Pleroma.Repo
5
6
def up do
7
user_nicknames = ["relay", "internal.fetch"]
8
9
from(
10
u in "users",
11
where: u.nickname in ^user_nicknames,
12
update: [
13
set: [invisible: true]
14
]
15
)
16
|> Repo.update_all([])
17
end
18
19
def down do
20
:ok
21
end
22
end