-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOISSUE - Use pgcrypto
instead uuid-ossp
for UUIDs generation
#1208
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1208 +/- ##
=======================================
Coverage 77.04% 77.04%
=======================================
Files 104 104
Lines 6934 6934
=======================================
Hits 5342 5342
Misses 1206 1206
Partials 386 386
Continue to review full report at Codecov.
|
pgcrypto
instead uuid-ossp
for UUIDs generation pgcrypto
instead uuid-ossp
for UUIDs generation
@sprql This looks good. I didn't understand what's the problem with |
users/postgres/init.go
Outdated
ALTER TABLE IF EXISTS users ADD COLUMN IF NOT EXISTS | ||
id UUID DEFAULT uuid_generate_v4()`, | ||
id UUID DEFAULT gen_random_uuid()`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I approve, can you just set id
column to NOT NULL (id UUID NOT NULL DEFAULT uuid_generate_v4()
), as well? We didn't include this change to any release, so it's safe to change this migration instead of adding another one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
…rsion 4) According to https://www.postgresql.org/docs/current/uuid-ossp.html it's recommended to use https://www.postgresql.org/docs/current/pgcrypto.html for randomly-generated (version 4) UUIDs Signed-off-by: Alexander Obukhov <dev@sprql.space>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…rsion 4) (#1208) According to https://www.postgresql.org/docs/current/uuid-ossp.html it's recommended to use https://www.postgresql.org/docs/current/pgcrypto.html for randomly-generated (version 4) UUIDs Signed-off-by: Alexander Obukhov <dev@sprql.space>
According to
https://www.postgresql.org/docs/current/uuid-ossp.html