From 099c5e81c338f56646451bad6fcc801533a1088d Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Thu, 29 Oct 2020 11:34:41 +0300 Subject: [PATCH] fix migrations --- priv/repo/migrations/20201012093959_create_tags.exs | 7 ++++++- .../20201021180413_import_legacy_tags_to_users_tags.exs | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/priv/repo/migrations/20201012093959_create_tags.exs b/priv/repo/migrations/20201012093959_create_tags.exs index 66e26f9a2..4f59f7bce 100644 --- a/priv/repo/migrations/20201012093959_create_tags.exs +++ b/priv/repo/migrations/20201012093959_create_tags.exs @@ -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 diff --git a/priv/repo/migrations/20201021180413_import_legacy_tags_to_users_tags.exs b/priv/repo/migrations/20201021180413_import_legacy_tags_to_users_tags.exs index 0cdcc5c19..a3a606fe2 100644 --- a/priv/repo/migrations/20201021180413_import_legacy_tags_to_users_tags.exs +++ b/priv/repo/migrations/20201021180413_import_legacy_tags_to_users_tags.exs @@ -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