1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-25 14:55:18 +01:00

Genereate uuids for existing info fields.

This commit is contained in:
lain 2018-12-01 12:00:33 +01:00
parent 347df6421d
commit 4996fb07d8
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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