question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue 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.

Source.

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:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
typokigncommented, Mar 12, 2019

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

10reactions
benjaminudoh10commented, Jun 3, 2020

This fixed the issue for me: CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 8.12. UUID Type - PostgreSQL
The data type uuid stores Universally Unique Identifiers (UUID) as defined by RFC 4122, ISO/IEC 9834-8:2005, and related standards.
Read more >
The Basics Of PostgreSQL UUID Data Type
Introduction to PostgreSQL UUID type ... As you can see, a UUID is a sequence of 32 digits of hexadecimal digits represented in...
Read more >
A Complete Guide to UUIDs in PostgreSQL - Arctype
Universally Unique IDs (UUIDs) use random numbers to create unique IDs. UUIDs use more storage, but they provide a good solution for distributed...
Read more >
PostgreSQL - UUID Data Type - GeeksforGeeks
PostgreSQL has its own UUID data type and provides modules to generate them. UUID is generally used in distributed systems as it guarantees ......
Read more >
Generating a UUID in Postgres for Insert statement?
Postgres natively supports UUID as a data type, even capable of being indexed and used as primary key. But to generate a UUID...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found