Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add support for prefixed KSUID primary_key_type #21

Closed
m-o-e opened this issue Oct 14, 2018 · 1 comment · Fixed by #1000
Closed

Feature request: Add support for prefixed KSUID primary_key_type #21

m-o-e opened this issue Oct 14, 2018 · 1 comment · Fixed by #1000
Labels
feature request A new requested feature / option

Comments

@m-o-e
Copy link

m-o-e commented Oct 14, 2018

It would be great if lucky_record could support prefixed KSUID as a primary_key_type.

Currently the only supported types are bare int and UUID.

A modern ID is short, optionally k-sortable and optionally prefixed with an abbreviated model id. Example (from Stripe): inv_SojvcbC89I7uo5

It would be great if lucky models could be configured to
generate IDs like the above by adding a line such
as this to the model file:

primary_key_type KSUID, prefix: 'inv'

@paulcsmith paulcsmith transferred this issue from luckyframework/lucky_record Feb 2, 2019
@jwoertink jwoertink added the feature request A new requested feature / option label Jun 10, 2019
@jwoertink
Copy link
Member

The PR #927 for this was closed out (I assume because the author no longer wants to work on it), but the code wasn't too far off from being done. If anyone would like to take the work started there and finish it up in a new PR, we can get this added in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new requested feature / option
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants