logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20191008132427_drop_users_following.exs (666B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Repo.Migrations.DropUsersFollowing do
  5. use Ecto.Migration
  6. # had to disable these to be able to restore `following` index concurrently
  7. # https://hexdocs.pm/ecto_sql/Ecto.Migration.html#index/3-adding-dropping-indexes-concurrently
  8. @disable_ddl_transaction true
  9. @disable_migration_lock true
  10. def change do
  11. drop(index(:users, [:following], concurrently: true, using: :gin))
  12. alter table(:users) do
  13. remove(:following, {:array, :string}, default: [])
  14. end
  15. end
  16. end