summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs')
-rw-r--r--priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs6
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 ce4590954..c547d2642 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)