summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20200406105422_users_remove_source_data.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-04-17 16:23:58 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-04-17 16:23:58 +0300
commit6e6f95c6aed77cbde1a58edcdbb5cc4f68416bca (patch)
tree923a489a9a6144bd31ff54d24140c1fd1259ae05 /priv/repo/migrations/20200406105422_users_remove_source_data.exs
parentac672a9d6bfdd3cba7692f80a883bd38b0b09a57 (diff)
parent09bd1d12c112fe45563c25a76afde65a3381aa26 (diff)
downloadpleroma-6e6f95c6aed77cbde1a58edcdbb5cc4f68416bca.tar.gz
pleroma-6e6f95c6aed77cbde1a58edcdbb5cc4f68416bca.zip
Merge remote-tracking branch 'remotes/origin/develop' into 1559-follow-request-notifications
# Conflicts: # CHANGELOG.md
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