Open imalsogreg opened 8 years ago
I think it will be a nice feature. I will see if there is a way to replace AutoKeyType
used for the autoincremented keys with something more flexible. If the primary key can be defined with custom database type and a default, that would be sufficient for using UUID.
Any progress or thoughts on this?
Some parts of the architecture rely on the autoincremented key always having the type defined for the database in the type family AutoKeyType
. Adding setting for the DB schema is only a half of the feature. I'll try to get back to this issue the next week.
I like how TH-derived automatically incremented int keys free me from having to put any kind of primary key directly in my type, since often the key has nothing to do with my business logic, and sometimes I don't know what the key is until the database tells me.
Is it possible to get the same functionality but with V4 UUID's (if I commit myself to Postgres)? Or would I need to have an actual UUID field in my Haskell record if I want a UUID key?