PostgreSQL UUID
See original GitHub issueIssue type:
[ ] question [ ] bug report [x] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[x] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[ ] @next
[x] 0.2.8
(or put your version here)
Steps to reproduce or a small repository showing the problem:
Historically this module depended on the OSSP UUID library, which accounts for the module’s name. While the OSSP UUID library can still be found at http://www.ossp.org/pkg/lib/uuid/, it is not well maintained, and is becoming increasingly difficult to port to newer platforms.
If you only need randomly-generated (version 4) UUIDs, consider using the gen_random_uuid() function from the pgcrypto module instead.
So, when @PrimaryGeneratedColumn(‘uuid’) used, seems it’s recommended to use another extension.
By the way, how to change the name of constraint that PrimaryGeneratedColumn create?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (4 by maintainers)
@GitStorageOne I know this is super late but this is fixed in v0.2.15 - you can now specify
uuidExtension: 'pgcrypto'
in your Postgres connection settings.This fixed the issue for me:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";