Odd DB error. Column not found. Migrate seems fine. #12285
Unanswered
lonelyadmin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I updated snipe before the holiday break and Have now noticed any error. I'm getting an unknown column error for the assets table for "_snipeit_hostnamefqdn_9", there does exist a column named "_snipeit_hostname_fqdn_9" --- note the missing _ ---. I've slept too many times between the time I upgraded this and now, but I don't remember there being any issues with the update.
Any idea on what's going on here?
Version v6.0.14 - build 9038 (master) [System info shows (g163b3f6c0)]
PHP Version 7.4.33
Laravel Version 8.83.22
Error when saving asset:
If I need to provide more info, or post elsewhere, please let me know.
Thanks!
Update:
Grepping hostnamefqdn in all of the source was returning zilch, so I dumped the db and found a custom field with the name snipeit_hostnamefqdn_9. That is a custom field that was defined when we first installed. The field name is "Hostname/FQDN", any chance that slash is causing an issue here?
FWIW, this is the sql from that dump:
(9,'Hostname/FQDN','','text','2021-10-12 01:17:24','2021-10-12 01:17:24',NULL,NULL,0,'_snipeit_hostnamefqdn_9','Hostname or FQDN',0,0,0)
Another update:
Doing this seemed to resolve it:
MariaDB [snipeit]> update custom_fields set db_column = '_snipeit_hostname_fqdn_9' where db_column = '_snipeit_hostnamefqdn_9';
Beta Was this translation helpful? Give feedback.
All reactions