thomas4019 / expressa

API creation middleware with an admin interface
MIT License
439 stars 27 forks source link

postgres id column data type #130

Closed kane-mason closed 3 years ago

kane-mason commented 4 years ago

I know this is of my own doing, since i suggested there were benefits to using the uuid data type for the id column. One of the negatives is, that you have to use a uuid, which is not ideal for smaller tables where you want the document id to be something simple and readable. I still like the use of uuid by default, but wouldn't mind the flexibility to choose. Can you think of an elegant solution?

thomas4019 commented 4 years ago

Hmm, I do like the ability to have custom ids for some tables and this is already being done for the collection and role collections. I'm thinking we could have an option on the collection called something like useStringIds which lets you use normal string ids instead of uuid for PostgreSQL or ObjectIDs for Mongo. What do you think?

kane-mason commented 4 years ago

I like that idea - not overthinking it and practical

kane-mason commented 3 years ago

This has been implemented