Genereate uuids for existing info fields.
This commit is contained in:
parent
347df6421d
commit
4996fb07d8
|
@ -0,0 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddUUIDExtension do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
execute("create extension if not exists \"uuid-ossp\"")
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddUUIDsToUserInfo do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
execute("update users set info = jsonb_set(info, '{\"id\"}', to_jsonb(uuid_generate_v4()))")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue