1
0
Fork 0
forked from AkkomaGang/akkoma
akkoma/priv/repo/migrations/20191008132427_drop_users_following.exs

17 lines
507 B
Elixir
Raw Normal View History

defmodule Pleroma.Repo.Migrations.DropUsersFollowing do
use Ecto.Migration
2019-10-10 14:11:34 +00:00
# had to disable these to be able to restore `following` index concurrently
# https://hexdocs.pm/ecto_sql/Ecto.Migration.html#index/3-adding-dropping-indexes-concurrently
@disable_ddl_transaction true
@disable_migration_lock true
def change do
drop(index(:users, [:following], concurrently: true, using: :gin))
alter table(:users) do
remove(:following, {:array, :string}, default: [])
end
end
end