diff options
author | lain <lain@soykaf.club> | 2019-01-23 14:00:23 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-01-23 14:01:44 +0100 |
commit | ab03f8121979d541f41ce8581865f755329d6dc8 (patch) | |
tree | 085a2eea5df19d73b67831eb0802b66140771bfa | |
parent | 5067b791a124960e3561ff77065a36d45abd2552 (diff) | |
download | pleroma-ab03f8121979d541f41ce8581865f755329d6dc8.tar.gz pleroma-ab03f8121979d541f41ce8581865f755329d6dc8.zip |
Fix info ids.
The previous migration actually created values for the key "id", including the
quotes. This one should fill out all missing ids.
Closes #511
-rw-r--r-- | priv/repo/migrations/20190123125839_fix_info_ids.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190123125839_fix_info_ids.exs b/priv/repo/migrations/20190123125839_fix_info_ids.exs new file mode 100644 index 000000000..2b4c2b5a9 --- /dev/null +++ b/priv/repo/migrations/20190123125839_fix_info_ids.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.FixInfoIds do + use Ecto.Migration + + def change do + execute( + "update users set info = jsonb_set(info, '{id}', to_jsonb(uuid_generate_v4())) where info->'id' is null;" + ) + end +end |