bookshelf-uuid | Automatically generates UUIDs for your bookshelf models | Generator Utils library
kandi X-RAY | bookshelf-uuid Summary
kandi X-RAY | bookshelf-uuid Summary
Automatically generates UUIDs for your bookshelf models
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bookshelf-uuid
bookshelf-uuid Key Features
bookshelf-uuid Examples and Code Snippets
Community Discussions
Trending Discussions on bookshelf-uuid
QUESTION
Currently in the process of migrating to to postgres after the announcement about dropping mongodb, Just noticed that the ID's are just numbers and auto-incremented.
I have tried:
- Setting the default ID as a UUID with a lifecycle hook - No effect
- Installing bookshelf-uuid
Anyone know how to do this? I very much do not want the ID of my post to be an auto-incremented number.
...ANSWER
Answered 2021-May-15 at 11:03Auto-incremented ids and uuids are in general a different concept. For uuids as primary key one often uses random values. Due to the large range of values, duplicates are almost impossible.
You can define an auto-generated uuid primary key as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bookshelf-uuid
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page