MantisBT - TestLink
View Issue Details
0006980TestLinkDatabase MS-SQLpublic2015-03-04 14:442015-09-19 08:49
christian_s 
fman 
highmajoralways
closedfixed 
Turnkey Linux
1.9.13 (2015 #1) 
1.9.14 (2015 Q3) 
MS-SQL
READY FOR TESTING
0006980: Problem database MSSQL Update from 1.9.9.0 to 1.9.13.0:
Problem database MSSQL Update from 1.9.9.0 to 1.9.13.0 doesn't work !?
Installation of Testlink 1.9.9.0 with MS-SQL Database

Update MS-SQL Database with delivered SQl Statements in

testlink-1913\install\sql\alter_tables\1.9.10\mssql\DB.1.9.10\step1 OK

testlink-1913\install\sql\alter_tables\1.9.11\mssql\DB.1.9.11\step1 NOT OK (add. infos)

testlink-1913\install\sql\alter_tables\1.9.11\mssql\DB.1.9.12\step1 NOT OK
(add. infos)
testlink-1913\install\sql\alter_tables\1.9.11\mssql\DB.1.9.13\step1 NOT OK
(add. infos)
Update MSSQL Statement 1.9.11.0 doesn’t fit to install statement ?

UPDATE:
CREATE TABLE /*prefix*/execution_tcsteps (
   execution_id int NOT NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_execution_id DEFAULT ((0)),
   tcstep_id int NOT NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_tcstep_id DEFAULT ((0)),
   notes nvarchar(max) NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_notes DEFAULT (NULL),
   status char(1) NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_status DEFAULT (NULL),
  CONSTRAINT /*prefix*/PK_executions PRIMARY KEY CLUSTERED
  (
  execution_id,tcstep_id ASC
  ) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];

INSTALL:
--
-- Table structure for table "execution_tcsteps"
--
CREATE TABLE /*prefix*/execution_tcsteps (
   id int IDENTITY(1,1) NOT NULL,
   execution_id int NOT NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_execution_id DEFAULT ((0)),
   tcstep_id int NOT NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_tcstep_id DEFAULT ((0)),
   notes nvarchar(max) NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_notes DEFAULT (NULL),
   status char(1) NULL CONSTRAINT /*prefix*/DF_execution_tcsteps_status DEFAULT (NULL),
  CONSTRAINT /*prefix*/PK_executions_tcsteps PRIMARY KEY CLUSTERED
  (
    id ASC
  ) ON [PRIMARY],

  CONSTRAINT /*prefix*/UIX_executions_tcsteps UNIQUE NONCLUSTERED
  (
  execution_id,tcstep_id ASC
  ) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];


********************************************************************
testlink-1913\install\sql\alter_tables\1.9.11\mssql\DB.1.9.12\step1 NOT OK
testlink-1913\install\sql\alter_tables\1.9.11\mssql\DB.1.9.13\step1 NOT OK

The statements are equal and differs from the MYSQL statements and the create statement for "testcase_relations" false with CONSTRAINT exists. The same situation in the install script ?

CREATE TABLE /*prefix*/testcase_relations (
  id int IDENTITY(1,1) NOT NULL,
  source_id INT NOT NULL DEFAULT '0',
  destination_id INT NOT NULL DEFAULT '0',
  relation_type INT NOT NULL DEFAULT '1',
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_testcase_relations_creation_ts DEFAULT (getdate()),
  CONSTRAINT /*prefix*/PK_req_relations PRIMARY KEY CLUSTERED
  (
    id
  ) ON [PRIMARY]
) ON [PRIMARY];

---
CREATE TABLE /*prefix*/req_relations (
  id int IDENTITY(1,1) NOT NULL,
  source_id INT NOT NULL DEFAULT '0',
  destination_id INT NOT NULL DEFAULT '0',
  relation_type INT NOT NULL DEFAULT '1',
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_req_relations_creation_ts DEFAULT (getdate()),
  CONSTRAINT /*prefix*/PK_req_relations PRIMARY KEY CLUSTERED
  (
    id
  ) ON [PRIMARY]
) ON [PRIMARY];
No tags attached.
related to 0006540closed fman Error creating tables into database using the script provided with 1.9.11 
related to 0006816closed fman DB access error when clicking on Requirement Overview 
Issue History
2015-03-04 14:44christian_sNew Issue
2015-03-04 16:29fmanRelationship addedrelated to 0006540
2015-03-04 16:29fmanRelationship addedrelated to 0006816
2015-03-04 16:34fmanNote Added: 0022807
2015-03-10 08:09christian_sNote Added: 0022846
2015-03-31 22:38fmanQA Team - Task Workflow Status => READY FOR TESTING
2015-03-31 22:38fmanNote Added: 0023017
2015-03-31 22:38fmanStatusnew => resolved
2015-03-31 22:38fmanFixed in Version => 1.9.14 (2015 Q3)
2015-03-31 22:38fmanResolutionopen => fixed
2015-03-31 22:38fmanAssigned To => fman
2015-09-19 08:49fmanNote Added: 0023967
2015-09-19 08:49fmanStatusresolved => closed

Notes
(0022807)
fman   
2015-03-04 16:34   
>> Update MSSQL Statement 1.9.11.0 doesn’t fit to install statement ?
please use the install sql query
ONCE release is done is never fixed with same version, i.e. errors on update sql scripts (may be) will be fixed on next version.

>> The statements are equal and differs from the MYSQL statements and the create >>statement for "testcase_relations" false with CONSTRAINT exists. The same >>situation in the install script ?
unfortunately your explanation is far from clear for me
(0022846)
christian_s   
2015-03-10 08:09   
>> The statements are equal and differs from the MYSQL statements and the create >>statement for "testcase_relations" false with CONSTRAINT exists. The same >>situation in the install script ?
unfortunately your explanation is far from clear for me

The following SQL-Statement works for the "CREATE TABLE /*prefix*/testcase_relations":

CREATE TABLE /*prefix*/testcase_relations (
  id int IDENTITY(1,1) NOT NULL,
  source_id INT NOT NULL DEFAULT '0',
  destination_id INT NOT NULL DEFAULT '0',
  relation_type INT NOT NULL DEFAULT '1',
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_testcase_relations_creation_ts DEFAULT (getdate()),
  CONSTRAINT /*prefix*/PK_testcase_relations PRIMARY KEY CLUSTERED
  (
    id
  ) ON [PRIMARY]
) ON [PRIMARY];

INSERT INTO /*prefix*/db_version (version,notes,upgrade_ts) VALUES ('DB 1.9.13','Test Link 1.9.13',GETDATE());

>> The problem was that "PK_req_relations" exists. So we changed it to "PK_testcase_relations"
(0023017)
fman   
2015-03-31 22:38   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/5268dcc3cd9b6d969fe94ed64ced21856eef272e [^]
(0023967)
fman   
2015-09-19 08:49   
1.9.14 Padawan - released - 2015-09-19