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
uuid primary key as binary(16) in mysql #683
Comments
I'm not entirely clear what you're trying to do here. If it's essentially string keys, you could simply use string UUIDs, and generate your own via some auto-increment function, then save them as custom UUID strings on each item. This is just a workaround, but I'm not entirely clearly why you would want to do this. |
let me explain:
Is this possible? Thanks |
I did this before in PHP. It's tricky because UUIDs contain dashes which need to be removed before storage and added after read. It is indeed a lot faster and saves disk space. Currently this is not possible but we welcome PRs. |
You can take a look at how I did it in PHP: https://github.com/der-On/PHP-FluxAPI-Plugins-Core/blob/master/Storage/MySql.php#L805 |
I want to use uuid as primary key but stored as binary 16 in mysql db. is there anyway to apply hook on insert and apply hex/unhex on the uuid with dashes removed?
The text was updated successfully, but these errors were encountered: