aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
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