fix migrations

This commit is contained in:
Maksim Pechnikov 2020-10-29 11:34:41 +03:00 committed by Alexander Strizhakov
parent b9f8d3763d
commit 099c5e81c3
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381
2 changed files with 18 additions and 3 deletions

View File

@ -10,7 +10,12 @@ defmodule Pleroma.Repo.Migrations.CreateTags do
create_if_not_exists(unique_index(:tags, :name))
flush()
execute(collect_user_tags_query())
Ecto.Adapters.SQL.query(
Pleroma.Repo,
collect_user_tags_query(),
[],
timeout: :infinity
)
end
def down do

View File

@ -2,7 +2,12 @@ defmodule Pleroma.Repo.Migrations.ImportLegacyTagsToUsersTags do
use Ecto.Migration
def up do
execute(import_user_tags())
Ecto.Adapters.SQL.query(
Pleroma.Repo,
import_user_tags(),
[],
timeout: :infinity
)
alter table(:users) do
remove_if_exists(:tags, {:array, :string})
@ -20,7 +25,12 @@ defmodule Pleroma.Repo.Migrations.ImportLegacyTagsToUsersTags do
flush()
execute(restore_tags_column())
Ecto.Adapters.SQL.query(
Pleroma.Repo,
restore_tags_column(),
[],
timeout: :infinity
)
end
defp import_user_tags do