summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20200406105422_users_remove_source_data.exs
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-04-06 10:59:35 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-04-10 06:20:03 +0200
commite89078ac2a27bb0a833c982dbb5eef63ddea3cc0 (patch)
tree48e529088dd7a0ad2fa076b4d28e7ee162c60644 /priv/repo/migrations/20200406105422_users_remove_source_data.exs
parent3420dec494203b46d37ddc17f7e1235dc908a5b3 (diff)
downloadpleroma-e89078ac2a27bb0a833c982dbb5eef63ddea3cc0.tar.gz
pleroma-e89078ac2a27bb0a833c982dbb5eef63ddea3cc0.zip
User: remove source_data
Diffstat (limited to 'priv/repo/migrations/20200406105422_users_remove_source_data.exs')
-rw-r--r--priv/repo/migrations/20200406105422_users_remove_source_data.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200406105422_users_remove_source_data.exs b/priv/repo/migrations/20200406105422_users_remove_source_data.exs
new file mode 100644
index 000000000..9812d480f
--- /dev/null
+++ b/priv/repo/migrations/20200406105422_users_remove_source_data.exs
@@ -0,0 +1,15 @@
+defmodule Pleroma.Repo.Migrations.UsersRemoveSourceData do
+ use Ecto.Migration
+
+ def up do
+ alter table(:users) do
+ remove_if_exists(:source_data, :map)
+ end
+ end
+
+ def down do
+ alter table(:users) do
+ add_if_not_exists(:source_data, :map, default: %{})
+ end
+ end
+end