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

uuid database field field not populating for new serial numbers. #383

Open
gmn42 opened this issue Sep 2, 2023 · 0 comments
Open

uuid database field field not populating for new serial numbers. #383

gmn42 opened this issue Sep 2, 2023 · 0 comments

Comments

@gmn42
Copy link
Contributor

gmn42 commented Sep 2, 2023

This may be low priority because it doesn't seem to be used for anything (yet), but I have noticed that the new uuid database field is not assigned a uuid for new serial numbers, although the update_156() routine took care to assign them for existing entries.

I was able to address it on the database side with:
ALTER TABLE {$prefix}serial_numbers CHANGE uuid uuid DEFAULT (UUID());
UPDATE {$prefix}serial_numbers SET uuid = UUID() WHERE uuid IS NULL;

Note that default value function seems to require mysql >= 8.0.13 (2018), so I don't know if you want this dependency. See https://stackoverflow.com/questions/46134550/mysql-set-default-id-uuid for alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant