View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
13261Bug reportsInstallationpublic2018-01-30 13:58
Reporterdapster105 Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status closedResolutionduplicate 
Product Version3.1.x 
Summary13261: updatedb_help.php breaks on SQL Server
Description

Specifically:

Upgrade to 333:
CANT CREATE PK ON A NULLABLE COLUMN
function upgrade333($oDB)
{
$oDB->createCommand()->createTable('{{map_tutorial_users}}', array(
'tid' => 'int NOT NULL',
'uid' => 'int DEFAULT NULL',
'taken' => 'int DEFAULT 1',
));

$oDB->createCommand()->addPrimaryKey('{{map_tutorial_users_pk}}', '{{map_tutorial_users}}', ['uid', 'tid']);

Upgrade to 338:
CANT INSERT INTO IDENTITY COLUMN - Postgres 'fix' below has broken SQL Server
// NB: Needed since Postgres id seq might not work.
$maxId = $oDB->createCommand()->select('max(id)')->from("{{boxes}}")->queryScalar();

        $oDB->createCommand()->insert(
            "{{boxes}}",
            [
                'id' => $maxId + 1,
                'position' => $position,
                'url' => 'admin/themeoptions',
                'title' => 'Themes',
                'ico' => 'templates',
                'desc' => 'Themes',
                'page' => 'welcome',
                'usergroup' => '-2'
            ]
        );
Steps To Reproduce

run db upgrades from <333 to >338

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)3.10 (whatever)
I will donate to the project if issue is resolvedNo
Browser
Database type & versionSql Server
Server OS (if known)Win
Webserver software & version (if known)IIS
PHP Versionlatest

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2018-01-30 13:58

administrator   ~46147

Fixed in this commit: 3765c45118dd511c7b43933c2ca595f4915cedd9

Not yet released.

Issue History

Date Modified Username Field Change
2018-01-30 08:22 dapster105 New Issue
2018-01-30 13:58 ollehar Assigned To => ollehar
2018-01-30 13:58 ollehar Status new => closed
2018-01-30 13:58 ollehar Resolution open => duplicate
2018-01-30 13:58 ollehar Note Added: 46147