(SOLVED) Database structure validation
Posted: Wed Aug 26, 2020 3:50 pm
Version of script: 3.1.2
What terms did you try when SEARCHING for a solution: Database structure
Write your message below:
Is there a function/script to validate my database structure? One of my HESK databases seems to be missing fields.
I run 2 HESK installations, both licensed, both on version 3.1.2, the newest started on version 3.1.1 (here in 2020), and the old one started on version 2.5.3 (in 2014) and have therefore been updated many times.
The "team users" of the oldest HESK installation, noticed today that the "Create new ticket" button under the admin section did not work anymore, it failed with an SQL error, on the following statement:
SELECT `id`, `name`, `priority` FROM `hesk_categories` ORDER BY `cat_order` ASC
It worked fine on the young installation, so I looked in the database, and discovered that the "priority" field in that table where missing on the old installation, I created the field as in the other, and now the "Create new ticket" works fine again.
I looked quick in the database and can see that in the table hesk_attachments the field "type" is also missing on the old installation, so are there any more fields that are missing from the old installaion? They do not use heskdesk, so it is possible that missing fields are not used.
Is there a way I can validate the structure in the database for missing fields?
Thanks in advance.
What terms did you try when SEARCHING for a solution: Database structure
Write your message below:
Is there a function/script to validate my database structure? One of my HESK databases seems to be missing fields.
I run 2 HESK installations, both licensed, both on version 3.1.2, the newest started on version 3.1.1 (here in 2020), and the old one started on version 2.5.3 (in 2014) and have therefore been updated many times.
The "team users" of the oldest HESK installation, noticed today that the "Create new ticket" button under the admin section did not work anymore, it failed with an SQL error, on the following statement:
SELECT `id`, `name`, `priority` FROM `hesk_categories` ORDER BY `cat_order` ASC
It worked fine on the young installation, so I looked in the database, and discovered that the "priority" field in that table where missing on the old installation, I created the field as in the other, and now the "Create new ticket" works fine again.
I looked quick in the database and can see that in the table hesk_attachments the field "type" is also missing on the old installation, so are there any more fields that are missing from the old installaion? They do not use heskdesk, so it is possible that missing fields are not used.
Is there a way I can validate the structure in the database for missing fields?
Thanks in advance.