[#3213] Partially addressed code review points.

migration rollback task changes, hashtags-related config handling tweaks, `hashtags.data` deletion (unused).
This commit is contained in:
Ivan Tashkinov 2021-02-07 22:24:12 +03:00
commit d1c6dd97aa
9 changed files with 63 additions and 42 deletions

View file

@ -4,7 +4,6 @@ defmodule Pleroma.Repo.Migrations.CreateHashtags do
def change do
create_if_not_exists table(:hashtags) do
add(:name, :citext, null: false)
add(:data, :map, default: %{})
timestamps()
end

View file

@ -0,0 +1,15 @@
defmodule Pleroma.Repo.Migrations.RemoveDataFromHashtags do
use Ecto.Migration
def up do
alter table(:hashtags) do
remove_if_exists(:data, :map)
end
end
def down do
alter table(:hashtags) do
add_if_not_exists(:data, :map, default: %{})
end
end
end