I've upgraded my LimeSurvey instance from 2.72.4 to 3.0.1. When I started LimeSurvey, it attempted to update the database from version 328 to 338, but it encountered the following error:
An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "NOT" LINE 1: ...ALTER COLUMN "name" TYPE character varying (168) NOT NULL ^
This is a PostgreSQL 9.2.23 database. My SQL knowledge is extremely limited, so any help would be greatly appreciated.
I upgraded to Postgres 10 and PHP 7, but the syntax error still occurred. I deleted the database and had LS create a new one from scratch, and that caused the following:
Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "active" is of type boolean but default expression is of type integer
HINT: You will need to rewrite or cast the expression. #0 /var/www/html/limesurvey/framework/db/CDbCommand.php(1352): CDbCommand->execute()
#1 /var/www/html/limesurvey/installer/create-database.php(276): CDbCommand->createTable('{{plugins}}', Array)
#2 /var/www/html/limesurvey/application/controllers/InstallerController.php(904): createDatabase(Object(DbConnection))
#3 /var/www/html/limesurvey/application/controllers/InstallerController.php(519): InstallerController->_setup_tables('/var/www/html/l...')
#4 /var/www/html/limesurvey/application/controllers/InstallerController.php(82): InstallerController->stepPopulateDb()
#5 /var/www/html/limesurvey/framework/web/CWebApplication.php(282): InstallerController->run('populatedb')
#6 /var/www/html/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController('installer/popul...')
#7 /var/www/html/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#8 /var/www/html/limesurvey/index.php(195): CApplication->run()
#9 {main}
I think I'll submit a bug report, but if anyone has other suggestions, please let me know.
Have you considered posting messages on the download site when you encounter major bugs like this? In this case, you'd want Postgres users to know not to install the 3.0.1 update on their production systems.