1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.MakeFollowingPostgresArray do
10 add(:following_temp, {:array, :string})
14 update users set following_temp = array(select jsonb_array_elements_text(following));
17 alter table(:users) do
21 rename(table(:users), :following_temp, to: :following)