Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Syntax error when upgrading database with 3.0.1 installation

  • hgreenwald
  • hgreenwald's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162186 by hgreenwald
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.
The topic has been locked.
More
6 years 3 months ago #162190 by jelo
You might post a bugreport.
www.limesurvey.org/community/bug-tracker

There are issues with other databases as well.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • hgreenwald
  • hgreenwald's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162191 by hgreenwald
I've tried to get around it by upgrading to PostgreSQL 10. And now my PHP is out of date, so I'm working on that.
The topic has been locked.
  • hgreenwald
  • hgreenwald's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162203 by hgreenwald
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.
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
6 years 3 months ago #162253 by ollehar
Thank you for your bug report. I will test with Postgres.
The following user(s) said Thank You: hgreenwald
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
6 years 3 months ago #162314 by ollehar
This is resolved, please wait until release 3.0.2 and try again with this version.
The following user(s) said Thank You: hgreenwald
The topic has been locked.
  • hgreenwald
  • hgreenwald's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #162342 by hgreenwald
Thank you for addressing this!

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.
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
6 years 3 months ago #162343 by ollehar
3.0 is not ready to upgrade from 2.73 (that's why it's not yet visible in ComfortUpdate), but fresh install should work (and have less risk).
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose