summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2021-02-07 22:24:12 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2021-02-07 22:24:12 +0300
commitd1c6dd97aa503ca7c897d67d98fe8c924e113a61 (patch)
tree337e5fb61f36e458bfdfca4f925b7c063d6348b0 /priv
parent4e14945670bac15a6e183eb8c552d6e0669713ac (diff)
[#3213] Partially addressed code review points.
migration rollback task changes, hashtags-related config handling tweaks, `hashtags.data` deletion (unused).
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20201221202251_create_hashtags.exs1
-rw-r--r--priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs15
2 files changed, 15 insertions, 1 deletions
diff --git a/priv/repo/migrations/20201221202251_create_hashtags.exs b/priv/repo/migrations/20201221202251_create_hashtags.exs
index afc522002..8d2e9ae66 100644
--- a/priv/repo/migrations/20201221202251_create_hashtags.exs
+++ b/priv/repo/migrations/20201221202251_create_hashtags.exs
@@ -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
diff --git a/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs b/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs
new file mode 100644
index 000000000..0442c3b87
--- /dev/null
+++ b/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs
@@ -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