Enable mix format for migrations
This commit is contained in:
parent
44e0c5cabb
commit
32808208be
94 changed files with 405 additions and 264 deletions
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do
|
|||
|> Enum.each(fn %{id: user_id, bookmarks: bookmarks} ->
|
||||
Enum.each(bookmarks, fn ap_id ->
|
||||
activity = Activity.get_create_by_object_ap_id(ap_id)
|
||||
unless is_nil(activity), do: {:ok, _} = Bookmark.create(user_id, activity.id)
|
||||
unless is_nil(activity), do: {:ok, _} = Bookmark.create(user_id, activity.id)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do
|
|||
|
||||
def down do
|
||||
alter table(:users) do
|
||||
add :bookmarks, {:array, :string}, null: false, default: []
|
||||
add(:bookmarks, {:array, :string}, null: false, default: [])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue