Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
4996fb07
Commit
4996fb07
authored
Dec 01, 2018
by
lain
Browse files
Genereate uuids for existing info fields.
parent
347df642
Changes
2
Hide whitespace changes
Inline
Side-by-side
priv/repo/migrations/20181201104428_add_uuid_extension.exs
0 → 100644
View file @
4996fb07
defmodule
Pleroma
.
Repo
.
Migrations
.
AddUUIDExtension
do
use
Ecto
.
Migration
def
change
do
execute
(
"create extension if not exists
\"
uuid-ossp
\"
"
)
end
end
priv/repo/migrations/20181201105617_add_uui_ds_to_user_info.exs
0 → 100644
View file @
4996fb07
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment