mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Merge branch 'fix/migration-schema' into 'develop'
Fix bookmark migration using a query with a schema See merge request pleroma/pleroma!1923
This commit is contained in:
commit
9d8da9ea15
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue