Articles in this section

Pull request from remote GIT repository returns an error: A table must have a primary key, but none was found for table 'Applications'

Plesk for Linux kb: technical

Symptoms

  • Initiating a Pull request from the remote GIT repository via the Plesk panel returns an error:

PLESK_ERROR: Cannot pull changes from the remote server to the "example-laravel.git" repository. A table must have a primary key, but none was found for table 'Applications'

CONFIG_TEXT: DEBUG [extension/git] Zend_Db_Table_Exception: A table must have a primary key, but none was found for table 'Applications' file: /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Db/Table/Abstract.php line: 889 code: 0 trace: #0 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Db/Table/Abstract.php(983): Zend_Db_Table_Abstract->_setupPrimaryKey() #1 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Db/Table/Select.php(100): Zend_Db_Table_Abstract->info() #2 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Db/Table/Select.php(78): Zend_Db_Table_Select->setTable(object of type PleskExt\Laravel\Db\Table\Applications) #3 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Db/Table/Abstract.php(1019): Zend_Db_Table_Select->__construct(object of type PleskExt\Laravel\Db\Table\Applications) #4 /usr/local/psa/admin/plib/modules/laravel/library/Service/Application.php(79): Zend_Db_Table_Abstract->select() #5 /usr/local/psa/admin/plib/modules/laravel/library/DeploymentPlugin/DeploymentPlugin.php(96): PleskExt\Laravel\Service\Application::getByDomainID(integer '2374') ...

  • Error is returned for all domains with Laravel Toolkit installed
  • The table mentioned in the error message is absent from Laravel Toolkit database:

# sqlite3 /usr/local/psa/var/modules/laravel/laravel_toolkit.sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
sqlite>

Cause

Bug with ID #EXTGIT-332.  It will be fixed in one of the future updates.

Resolution

Until the bug is fixed, the following steps can be used as a workaround:

  1. Login to the server via SSH
  2. Execute the following command to reinstall the extension and recreate its database:

# plesk bin extension -i laravel

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.