From: lain Date: Wed, 23 Jan 2019 13:00:23 +0000 (+0100) Subject: Fix info ids. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ab03f8121979d541f41ce8581865f755329d6dc8;p=akkoma 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 --- 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