Database Update from 1.92 to 3.20.2 failed

2 months 3 weeks ago - 2 months 3 weeks ago #191575 by BB2oo6
Hi Guys,

I want to bring the old version up to date.

I can not upgrade the database or I get interrupted with an error message.

CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The index 'lime_questions_questions_idx4' is dependent on column 'type'.. The SQL statement executed was: ALTER TABLE [lime_questions] ALTER COLUMN [type] nvarchar(1) NOT NULL

OS: Windows Server 2016
Webserver: IIS 10
PHP: 7.3
MSSQL: 11.0.7469.6

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
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');
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
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     }
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
 C:\inetpub\wwwroot\umfrage.xxxx\framework\db\CDbCommand.php(1445): CDbCommand->execute()
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\updatedb_helper.php(3977): CDbCommand->alterColumn("{{questions}}", "type", "string(1) NOT NULL")
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\updatedb_helper.php(746): alterColumn("{{questions}}", "type", "string(1)", false, ...)
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\update_helper.php(31): db_upgrade_all(156)
 C:\inetpub\wwwroot\umfrage.xxxx\application\controllers\admin\databaseupdate.php(40): CheckForDBUpgrades("yes")
 unknown(0): databaseupdate->db("yes")
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\actions\CAction.php(109): ReflectionMethod->invokeArgs(databaseupdate, array("yes"))
 C:\inetpub\wwwroot\umfrage.xxxx\application\core\Survey_Common_Action.php(83): CAction->runWithParamsInternal(databaseupdate, ReflectionMethod, array("r" => "admin/databaseupdate/sa/db/continue/yes", "sa" => "db", "continue" => "yes"))
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(308): Survey_Common_Action->runWithParams(array("r" => "admin/databaseupdate/sa/db/continue/yes", "sa" => "db", "continue" => "yes"))
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(286): CController->runAction(databaseupdate)
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(265): CController->runActionWithFilters(databaseupdate, array())
 C:\inetpub\wwwroot\umfrage.xxxx\application\controllers\AdminController.php(158): CController->run("databaseupdate")
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CWebApplication.php(282): AdminController->run("databaseupdate")
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CWebApplication.php(141): CWebApplication->runController("admin/databaseupdate/sa/db/continue/yes")
 C:\inetpub\wwwroot\umfrage.xxxx\framework\base\CApplication.php(185): CWebApplication->processRequest()
 C:\inetpub\wwwroot\umfrage.xxxx\index.php(194): CApplication->run()

Can you help me??

Last edit: 2 months 3 weeks ago by BB2oo6.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
2 months 3 weeks ago - 2 months 3 weeks ago #191576 by holch
I am not surprised.

In between these two main versions were two other main versions (2.06 LTS and 2.7x).

It is a little bit like updating straight from Windows 98 to Windows 10. Won't work...

You probably have to go in steps. Go from 1.9x to 2.06 LTS. From there you could try to go to 3.0, but you might want to make a stop via 2.7 first...

Of course IIS and MSSQL add another level of "problems". LS is mostly tested on LAMP environments, and from time to time MSSQL specific problems appear.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last edit: 2 months 3 weeks ago by holch.
The following user(s) said Thank You: DenisChenu, cdorin, HHouston03

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!