Jump to content

Auto Upgrade Modul DatabaseException Duplicate entry '0' for key 'PRIMARY'


Recommended Posts

Dear Prestashop Community

 

As I tried to install the One-Click Upgrade Module there was an error:

 

 

[PrestaShopDatabaseException]

Duplicate entry '0' for key 'PRIMARY'
 

INSERT INTO `ps_tab` (`id_parent`, `position`, `module`, `class_name`, `active`, `hide_host_mode`) VALUES ('17', '9', 'autoupgrade', 'AdminSelfUpgrade', '1', '0')
at line 635 in file classes/db/Db.php

 

629.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
630.         }
631.         else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
632.         {
633.             if ($sql)
634.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
635.             throw new PrestaShopDatabaseException($this->getMsgError());
636.         }
637.     }
638.
639.     /**

 

I tried and googled but I could not found a solution. Can someone give me a hint how to solve this problem?

Best regards

Danny

Link to comment
Share on other sites

I found the solution. 

 

I logged in to mysql panel and took a look at the table "ps_tab". there was an id_tab with value "0". I deleted this entry and activated Autoincrement  for the id_tap. After that I could install the module!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...