projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix linkify ConfigDB migration
[akkoma]
/
priv
/
repo
/
migrations
/
20180221210540_make_following_postgres_array.exs
diff --git
a/priv/repo/migrations/20180221210540_make_following_postgres_array.exs
b/priv/repo/migrations/20180221210540_make_following_postgres_array.exs
index 5a8f8f6697b690f35884613947f3e0327f77b2b7..34e94fdc826fdcb31e1613414ebafa274f8c0f7e 100644
(file)
--- a/
priv/repo/migrations/20180221210540_make_following_postgres_array.exs
+++ b/
priv/repo/migrations/20180221210540_make_following_postgres_array.exs
@@
-3,17
+3,18
@@
defmodule Pleroma.Repo.Migrations.MakeFollowingPostgresArray do
def up do
alter table(:users) do
def up do
alter table(:users) do
- add
:following_temp, {:array, :string}
+ add
(:following_temp, {:array, :string})
end
end
- execute
"""
+ execute
(
"""
update users set following_temp = array(select jsonb_array_elements_text(following));
update users set following_temp = array(select jsonb_array_elements_text(following));
- """
+ """
)
alter table(:users) do
alter table(:users) do
- remove
:following
+ remove
(:following)
end
end
- rename table(:users), :following_temp, to: :following
+
+ rename(table(:users), :following_temp, to: :following)
end
def down, do: :ok
end
def down, do: :ok