View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
11603Bug reportsInstallationpublic2016-09-01 11:05
Reporterfvanderstarre Assigned Toollehar  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version2.51.x 
Fixed in Version2.51.x 
Summary11603: Upgrading from 2.50-160616 to 2.51-160829 fails with database error on MS-SQL
Description

Updating 2.50 build 160616 (db version 258) to 2.51 build 160829 (db version 260) fails with database error:
"An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 20018 Cannot insert the value NULL into column 'first_read', table 'LimeSurvey_temp.dbo.notifications'; column does not allow nulls. INSERT fails. [20018] (severity 16) [(null)]. The SQL statement executed was: INSERT INTO [dbo].[notifications] ([status], [importance], [display_class], [entity], [entity_id], [title], [message], [created]) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, GETDATE())"

Additional Information

Using dblib, FreeTDS

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)2.51 builld 160829
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionMS SQL server 2008
Server OS (if known)DB server: Windows NT 6.1 <X64> build 7601 SP1
Webserver software & version (if known)Linux RHEL 7, Apache 2.4.6
PHP Version5.6.21

Users monitoring this issue

There are no users monitoring this issue.

Activities

fvanderstarre

fvanderstarre

2016-08-31 09:51

reporter   ~40587

drivername should be checked when creating the notifications table in updatedb_helper.php, line #1420 and following ( if ($iOldDBVersion < 259) etc....)

fvanderstarre

fvanderstarre

2016-08-31 10:26

reporter   ~40596

Just removing "default" from first_read column definition did the trick (if no value specified, null is default anyway, and column must be nullable):
if ($iOldDBVersion < 259) {
$oDB->createCommand()->createTable('{{notifications}}', array(
'id' => 'pk',
'entity' => 'string(15) not null',
'entity_id' => 'int not null',
'title' => 'string not null', // varchar(255) in postgres
'message' => 'text not null',
'status' => 'string(15) default \'new\'',
'importance' => 'int default 1',
'display_class' => 'string(31) default \'default\'',
'created' => 'datetime not null',
'first_read' => 'datetime null'
));

ollehar

ollehar

2016-08-31 10:27

administrator   ~40597

Thanks, will apply this change.

ollehar

ollehar

2016-08-31 10:28

administrator   ~40598

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

c_schmitz

c_schmitz

2016-09-01 11:05

administrator   ~40628

Version 2.51.1 Build 160901 released

Related Changesets

LimeSurvey: master 2a999aaf

2016-08-31 08:28:37

ollehar

Details Diff
Fixed issue 11603: Upgrading from 2.50-160616 to 2.51-160829 fails with database error on MS-SQL Affected Issues
11603
mod - application/helpers/update/updatedb_helper.php Diff File

Issue History

Date Modified Username Field Change
2016-08-31 09:43 fvanderstarre New Issue
2016-08-31 09:51 fvanderstarre Note Added: 40587
2016-08-31 10:26 fvanderstarre Note Added: 40596
2016-08-31 10:27 ollehar Note Added: 40597
2016-08-31 10:28 ollehar Changeset attached => LimeSurvey master 2a999aaf
2016-08-31 10:28 ollehar Note Added: 40598
2016-08-31 10:28 ollehar Assigned To => ollehar
2016-08-31 10:28 ollehar Resolution open => fixed
2016-08-31 10:29 ollehar Status new => resolved
2016-08-31 10:29 ollehar Fixed in Version => 2.51.x
2016-09-01 11:05 c_schmitz Note Added: 40628
2016-09-01 11:05 c_schmitz Status resolved => closed