CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot insert duplicate key row in object 'dbo.lime_plugins' with unique index 'dbindexmanage_plugins_name'. The duplicate key value is (ComfortUpdateChecker).. The SQL statement executed was: INSERT INTO [lime_plugins] ([name], [plugin_type], [active], [version], [load_error], [load_error_message]) VALUES (:name, :plugin_type, :active, :version, :load_error, :load_error_message)

E:\WebSite\limesurvey\vendor\yiisoft\yii\framework\db\CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#1
+
 E:\WebSite\limesurvey\application\helpers\update\updates\Update_430.php(12): CDbCommand->insert("{{plugins}}", array("name" => "ComfortUpdateChecker", "plugin_type" => "core", "active" => 1, "version" => "1.0.0", ...))
07     public function up()
08     {
09             $this->db->createCommand()->insert(
10                 "{{plugins}}",
11                 [
12                     'name' => 'ComfortUpdateChecker',
13                     'plugin_type' => 'core',
14                     'active' => 1,
15                     'version' => '1.0.0',
16                     'load_error' => 0,
17                     'load_error_message' => null
#2
+
 E:\WebSite\limesurvey\application\helpers\update\DatabaseUpdateBase.php(47): LimeSurvey\Helpers\Update\Update_430->up()
42      */
43     public function safeUp()
44     {
45         $transaction = $this->db->beginTransaction();
46         try {
47             $this->up();
48             $this->updateVersion();
49             $transaction->commit();
50         } catch (Throwable $e) {
51             $transaction->rollback();
52             throw $e;
#3
+
 E:\WebSite\limesurvey\application\helpers\update\updatedb_helper.php(88): LimeSurvey\Helpers\Update\DatabaseUpdateBase->safeUp()
83     try {
84         // Get all relevant files from updates/ folder
85         $updates = getRelevantUpdates($iOldDBVersion, Yii::app()->db, $options);
86         foreach ($updates as $update) {
87             // NB: safeUp() wraps up() inside a transaction and also updates DBVersion.
88             $update->safeUp();
89         }
90     } catch (Exception $e) {
91         Yii::app()->setConfig('Updating', false);
92         // Activate schema caching
93         $oDB->schemaCachingDuration = 3600;
2023-07-12 10:50:03 Microsoft-IIS/10.0 Yii Framework/1.1.28