View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17357 | Bug reports | Database design | public | 2021-06-08 20:02 | 2021-07-12 11:53 |
Reporter | rjpinto | Assigned To | ollehar | ||
Priority | high | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.x | ||||
Summary | 17357: Database upgrade from 3.27.2 to latest 5.0.3 fails | ||||
Description | The database upgrade from the latest stable version to the new 5.x version fails because when adding the column all rows of that column are null which is not allowed by the DDL Current database version: 365 An non-recoverable error happened during the update. Error details: CDbCommand failed to execute the SQL statement: SQLSTATE[23502]: Not null violation: 7 ERROR: column "encrypted" contains null values File updatedb_helper.php, line 3322. line 3322 of the database upgrade script: | ||||
Steps To Reproduce | In a working limesurvey system deploy the latest 5.x version and copied the config.php. Login to start the database upgrade and it will fail. | ||||
Tags | No tags attached. | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 3.27.2 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Postgresql 12 with DB version 365 | ||||
Server OS (if known) | Ubuntu 20.04 LTS | ||||
Webserver software & version (if known) | Apache | ||||
PHP Version | 7.4 | ||||
Lacking default value? |
|
$oDB->createCommand()->addColumn('{{participant_attribute_names}}', 'encrypted', "string(5) NOT NULL DEFAULT 'N'"); Can you try to apply these changes and try again? |
|
Might be similar problems later in the file, I see. |
|
Adding a default value to the column fixes the update to version 5. Just tested after changing the lines you mentioned and the upgrade is successful. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32163 |
|
Thanks for testing! |
|
Release done. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-06-08 20:02 | rjpinto | New Issue | |
2021-06-08 20:43 | ollehar | Priority | none => high |
2021-06-08 20:44 | ollehar | Note Added: 64785 | |
2021-06-08 20:47 | ollehar | Note Added: 64786 | |
2021-06-08 20:48 | ollehar | Note Added: 64787 | |
2021-06-08 20:48 | ollehar | Assigned To | => ollehar |
2021-06-08 20:48 | ollehar | Status | new => feedback |
2021-06-10 22:45 | rjpinto | Note Added: 64868 | |
2021-06-10 22:45 | rjpinto | Status | feedback => assigned |
2021-07-01 10:50 | ollehar | Changeset attached | => LimeSurvey master ed5dbe80 |
2021-07-01 10:50 | ollehar | Note Added: 65176 | |
2021-07-01 10:50 | ollehar | Resolution | open => fixed |
2021-07-01 10:50 | ollehar | Note Added: 65177 | |
2021-07-01 10:50 | ollehar | Status | assigned => resolved |
2021-07-12 11:53 | c_schmitz | Note Added: 65336 | |
2021-07-12 11:53 | c_schmitz | Status | resolved => closed |