diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-11-02 15:07:47 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-11-02 15:07:47 +0000 |
commit | 9d8da9ea1501203662e08b6814ac324415653f3e (patch) | |
tree | 002ea3612bc19054118d683e12ee1c3a36c5d902 /priv | |
parent | 366ada7b29fec69ac6ff787ea5c771c866082fc8 (diff) | |
parent | c546da7cfe800ee0a0ac2ecf9981bb131cd63291 (diff) | |
download | pleroma-9d8da9ea1501203662e08b6814ac324415653f3e.tar.gz |
Merge branch 'fix/migration-schema' into 'develop'
Fix bookmark migration using a query with a schema
See merge request pleroma/pleroma!1923
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs index f3928a149..99102117f 100644 --- a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs +++ b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs @@ -8,10 +8,10 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do def up do query = - from(u in User, + from(u in "users", where: u.local == true, - where: fragment("array_length(bookmarks, 1)") > 0, - select: %{id: u.id, bookmarks: fragment("bookmarks")} + where: fragment("array_length(?, 1)", u.bookmarks) > 0, + select: %{id: u.id, bookmarks: u.bookmarks} ) Repo.stream(query) |