fix migrations
This commit is contained in:
parent
b9f8d3763d
commit
099c5e81c3
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user