summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20200406105422_users_remove_source_data.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-04-20 20:37:56 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-04-20 20:37:56 +0400
commit364eecc49f137ae3c7798ad240983591e27b134c (patch)
tree7ed228221db9794b0aae59fa0e548623c0aa12ae /priv/repo/migrations/20200406105422_users_remove_source_data.exs
parentdc8fa04192cc133749e762b78ec043e0902d046d (diff)
parent28165dad3ac02a6d3ba4b0cda51992a1831515dd (diff)
downloadpleroma-364eecc49f137ae3c7798ad240983591e27b134c.tar.gz
pleroma-364eecc49f137ae3c7798ad240983591e27b134c.zip
Merge branch 'develop' into global-status-expiration
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