View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
15841Bug reportsInstallationpublic2020-03-04 23:18
Reportermsvojsik Assigned Toc_schmitz  
PrioritynoneSeveritytweak 
Status closedResolutionduplicate 
Product Version3.22.3 
Summary15841: Incorrect dataset / identity insert property in SQL upgrade script on MSSQL DB engine for db object question_themes
Description

When upgrading from limesurvey version 3.22.3+ (DB version 359) to lime 4.1.2+ there's a problem with T-SQL query (MSSQL) while populating newly created table 'question_themes'.

T-SQL error:
Explicit value must be specified for identity column in table 'lime_question_themes' either when IDENTITY_INSERT is set to ON or when a replication user is inserting into a NOT FOR REPLICATION identity column.

Steps To Reproduce

while running on MSSQL 2017 db engine, try to upgrade from lime version 3.22.3+ (build 200211) to the version 4.1.2+ (build 200210).

Additional Information

I would suggest 2 possible options to resolve this, either

  1. modify the updatedb_helper.php script to check the data in collection $baseQuestionThemeEntries & ensure this collection contains the primary key values as well (values for field 'id')

or

  1. DO NOT use the MSSQL identity insert directive (line 2958 of the updatedb_helper) and let the DB engine add the primary key values on it's own.

Explanation:
You can NOT use the identity insert & ommit the values for primary key field/s at the same time.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)3.22.3+ build 200211
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMSSQL standard 2017, limesurvey db version 359
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.2

Relationships

duplicate of 15829 closedc_schmitz Upgrade from 3.21 to 4.1 - upgrade Database error (MSSQL) 

Users monitoring this issue

CarmIT, msvojsik

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-02-11 01:12 msvojsik New Issue
2020-02-11 01:26 msvojsik Issue Monitored: msvojsik
2020-02-11 09:05 CarmIT Issue Monitored: CarmIT
2020-02-11 10:49 ollehar Relationship added related to 15829
2020-03-04 23:18 c_schmitz Assigned To => c_schmitz
2020-03-04 23:18 c_schmitz Status new => closed
2020-03-04 23:18 c_schmitz Resolution open => duplicate
2020-03-04 23:18 c_schmitz Relationship replaced duplicate of 15829