Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[resolved] Error upgrading osTicket 1.7.3 to osTicket

edited May 2014 in Upgrade Help
Hi everyone,

When I try to upgrade osTicket from version 1.7.3 to, I get the following error:

DB Error #1146

[SELECT id, f.type, size, name, hash, f.created,  count(DISTINCT a.object_id) as canned, count(DISTINCT t.ticket_id) as tickets  FROM ost_file f  LEFT JOIN ost_attachment a ON(  LEFT JOIN ost_ticket_attachment t ON(  WHERE GROUP BY]

Table 'osticket.ost_attachment' doesn't exist<br />
<br />
---- Backtrace ----<br />
#0 C:\xampp\htdocs\soporte\include\mysqli.php(126): osTicket->logDBError('DB Error #1146', '[SELECT id, f.t...')<br />
#1 C:\xampp\htdocs\soporte\include\class.file.php(37): db_query('SELECT id, f.ty...')<br />
#2 C:\xampp\htdocs\soporte\include\class.file.php(22): AttachmentFile->load('6')<br />
#3 C:\xampp\htdocs\soporte\include\class.file.php(290): AttachmentFile->AttachmentFile('6')<br />
#4 C:\xampp\htdocs\soporte\include\class.config.php(910): AttachmentFile->lookup('6')<br />
#5 C:\xampp\htdocs\soporte\include\class.config.php(913): OsticketConfig->getLogo('client')<br />
#6 C:\xampp\htdocs\soporte\logo.php(26): OsticketConfig->getClientLogo()<br />
#7 {main}

Did I make a mistake? Is It a bug? How can i solve it?




  • Did you specify a client logo then? Because it's looking for one.

    Your table should definitely exist.. but might be corrupt. If you have a backup, simply go back and do the upgrade again, or try and repair the table..

    Try: CHECK TABLE `ost_attachment`

    If it says your table is corrupt, you will need to repair it.
  • Thanx for the answer Grizly

    I have installed osticket 1.7.3 in two diferente servers and no one has the "ost_attachment" table.
    I do specify a client logo, but is not there.
    Maybe i have to upgrade to 1.7.4 version before
    Also, I installed version 1.7.3 from scrath again to confirm that the table in discuss, doesn´t exists
  • Hi Dgarcia

    Did you ever manage to solve this problem

    Kind Regards

  • ost_attachment is the name of the table that file attachments are stored in.
    As soon as you upgraded to 1.7 you should have this table. This is the SQL to create it if its missing for some reason.

    CREATE TABLE `%TABLE_PREFIX%attachment` (
    `object_id` int(11) unsigned NOT NULL,
    `type` char(1) NOT NULL,
    `file_id` int(11) unsigned NOT NULL,
    `inline` tinyint(1) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`object_id`,`file_id`,`type`)
  • Very welcome.
  • thanx!
This discussion has been closed.