View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19396Bug reportsInstallationpublic2024-02-12 14:43
Reporterlavamind Assigned Tomohabmes  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version6.4.x 
Summary19396: Upgrade failure encountered at migration 620
Description

Today I attempted to upgrade our self-hosted LimeSurvey instance, with a PostgreSQL 15 database backend, from 6.4.1+240108 to 6.4.5+240205, and it failed at the database upgrade step:

Update pgsql:host=localhost;port=5432;user=limesurvey;password=[REDACTED];dbname=limesurvey; with prefix :lime_ from 619 to 623
CException: Please fix this error in your database and try again in /srv/www/survey.torproject.org/6.4.5+240205/limesurvey/application/commands/UpdateDbCommand.php:50
Stack trace:
#0 /srv/www/survey.torproject.org/6.4.5+240205/limesurvey/vendor/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): UpdateDBCommand->run()
#1 /srv/www/survey.torproject.org/6.4.5+240205/limesurvey/vendor/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#2 /srv/www/survey.torproject.org/6.4.5+240205/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#3 /srv/www/survey.torproject.org/6.4.5+240205/limesurvey/application/commands/console.php(77): CApplication->run()
#4 {main}

If I look at the database, it seems to have upgraded up until DBVersion 620, so it seems like the cause of the failure is the 621 database migration.

Steps To Reproduce

Steps to reproduce

Install LimeSurvey 6.4.x Community Edition then upgrade to 6.4.5.

Expected result

Upgrade works up to database version 623.

Actual result

Fails to upgrade to 623, stops at 620.

TagsPostgreSQL, update
Bug heat8
Complete LimeSurvey version number (& build)6.4.5+240205
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgreSQL 15
Server OS (if known)Debian 12
Webserver software & version (if known)Apache 2
PHP Version7.4.33

Users monitoring this issue

There are no users monitoring this issue.

Activities

lavamind

lavamind

2024-02-05 18:45

reporter   ~79420

I implemented this workaround before re-trying the database upgrade:

alter table lime_users drop column user_status;
update lime_settings_global set stg_value = '618' where stg_name = 'DBVersion';

Ran the database migrations again and this time it worked.

lavamind

lavamind

2024-02-05 18:53

reporter   ~79421

There have been several regressions with database migrations under PostgreSQL in recent weeks, I'm hoping this will improve in the future.

tibor.pacalat

tibor.pacalat

2024-02-06 09:39

administrator   ~79422

I can confirm this is happening (see screenshot below).

mohabmes

mohabmes

2024-02-06 17:24

developer   ~79425

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36044

tibor.pacalat

tibor.pacalat

2024-02-06 17:24

administrator   ~79426

Tested and merged.

LimeBot

LimeBot

2024-02-12 14:43

administrator   ~79453

Fixed in Release 6.4.6+240212

Related Changesets

LimeSurvey: master 0022905f

2024-02-06 18:24

mohabmes

Committer: GitHub


Details Diff
Fixed issue 19396: Upgrade failure encountered at migration 620 (#3724) Affected Issues
19396
mod - application/helpers/update/updates/Update_621.php Diff File

Issue History

Date Modified Username Field Change
2024-02-05 18:35 lavamind New Issue
2024-02-05 18:45 lavamind Note Added: 79420
2024-02-05 18:45 lavamind Bug heat 0 => 2
2024-02-05 18:53 lavamind Note Added: 79421
2024-02-05 18:54 lavamind Tag Attached: PostgreSQL
2024-02-05 18:54 lavamind Tag Attached: update
2024-02-06 09:37 tibor.pacalat Assigned To => mohabmes
2024-02-06 09:37 tibor.pacalat Status new => assigned
2024-02-06 09:39 tibor.pacalat Note Added: 79422
2024-02-06 09:39 tibor.pacalat File Added: Screenshot 2024-02-06 at 09.37.46.png
2024-02-06 09:39 tibor.pacalat Bug heat 2 => 4
2024-02-06 17:24 mohabmes Changeset attached => LimeSurvey master 0022905f
2024-02-06 17:24 mohabmes Note Added: 79425
2024-02-06 17:24 mohabmes Resolution open => fixed
2024-02-06 17:24 tibor.pacalat Bug heat 4 => 6
2024-02-06 17:24 tibor.pacalat Status assigned => resolved
2024-02-06 17:24 tibor.pacalat Note Added: 79426
2024-02-12 14:43 LimeBot Note Added: 79453
2024-02-12 14:43 LimeBot Status resolved => closed
2024-02-12 14:43 LimeBot Bug heat 6 => 8