Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for MySQL and PostgreSQL files in TestLink 1.9.20 (branch testlink_1_9_20_fixed) #251

Open
wants to merge 3 commits into
base: testlink_1_9_20_fixed
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ ALTER TABLE /*prefix*/testcase_keywords ADD INDEX /*prefix*/idx02_testcase_keywo
ALTER TABLE /*prefix*/milestones MODIFY target_date date NOT NULL;
ALTER TABLE /*prefix*/milestones MODIFY start_date date DEFAULT NULL;

ALTER TABLE /*prefix*/platforms MODIFY enable_on_design tinyint(1) unsigned NOT NULL default '0';
ALTER TABLE /*prefix*/platforms MODIFY enable_on_execution tinyint(1) unsigned NOT NULL default '1';

--
CREATE TABLE /*prefix*/execution_tcsteps_wip (
id int(10) unsigned NOT NULL auto_increment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ ALTER TABLE /*prefix*/testplan_platforms ADD COLUMN active INT2 NOT NULL DEFAULT
ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design INT2 NOT NULL DEFAULT '0';
ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution INT2 NOT NULL DEFAULT '1';

--
-- Table structure for table "execution_tcsteps_wip"
--
CREATE TABLE /*prefix*/execution_tcsteps_wip (
"id" BIGSERIAL NOT NULL ,
"tcstep_id" INTEGER NOT NULL DEFAULT '0' REFERENCES /*prefix*/tcsteps (id),
"testplan_id" INTEGER NOT NULL DEFAULT '0' REFERENCES /*prefix*/testplans (id),
"platform_id" INTEGER NOT NULL DEFAULT '0',
"build_id" INTEGER NOT NULL DEFAULT '0',
"tester_id" BIGINT NULL DEFAULT NULL,
"creation_ts" TIMESTAMP NOT NULL DEFAULT now(),
"notes" TEXT NULL DEFAULT NULL,
"status" CHAR(1) NULL DEFAULT NULL,
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX /*prefix*/execution_tcsteps_wip_uidx1 ON /*prefix*/execution_tcsteps_wip ("tcstep_id","testplan_id","platform_id","build_id");

--
-- Table structure for table "testcase_platforms"
--
Expand All @@ -42,7 +59,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_context (
"creation_ts" timestamp NOT NULL DEFAULT now(),
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX /*prefix*/udx1 ON /*prefix*/baseline_l1l2_context ("testplan_id","platform_id","creation_ts");
CREATE UNIQUE INDEX /*prefix*/udx1_baseline_l1l2_context ON /*prefix*/baseline_l1l2_context ("testplan_id","platform_id","creation_ts");


CREATE TABLE /*prefix*/baseline_l1l2_details (
Expand All @@ -55,7 +72,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_details (
"total_tc" INT NOT NULL DEFAULT '0',
PRIMARY KEY ("id")
) ;
CREATE UNIQUE INDEX /*prefix*/udx1
CREATE UNIQUE INDEX /*prefix*/udx1_baseline_l1l2_details
ON /*prefix*/baseline_l1l2_details ("context_id","top_tsuite_id","child_tsuite_id","status");


Expand Down
8 changes: 4 additions & 4 deletions install/sql/postgres/testlink_create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_context (
"creation_ts" timestamp NOT NULL DEFAULT now(),
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX /*prefix*/udx1 ON /*prefix*/baseline_l1l2_context ("testplan_id","platform_id","creation_ts");
CREATE UNIQUE INDEX /*prefix*/udx1_baseline_l1l2_context ON /*prefix*/baseline_l1l2_context ("testplan_id","platform_id","creation_ts");


CREATE TABLE /*prefix*/baseline_l1l2_details (
Expand All @@ -934,11 +934,11 @@ CREATE TABLE /*prefix*/baseline_l1l2_details (
"top_tsuite_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/testsuites (id),
"child_tsuite_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/testsuites (id),
"status" char(1) DEFAULT NULL,
"qty" INT unsigned NOT NULL DEFAULT '0',
"total_tc" INT unsigned NOT NULL DEFAULT '0',
"qty" INT NOT NULL DEFAULT '0',
"total_tc" INT NOT NULL DEFAULT '0',
PRIMARY KEY ("id")
) ;
CREATE UNIQUE INDEX /*prefix*/udx1
CREATE UNIQUE INDEX /*prefix*/udx1_baseline_l1l2_details
ON /*prefix*/baseline_l1l2_details ("context_id","top_tsuite_id","child_tsuite_id","status");


Expand Down