From b63197c3ec892f7a36c7487e942161b1cec8b7ee Mon Sep 17 00:00:00 2001 From: heuj <58398276+heuj@users.noreply.github.com> Date: Mon, 20 Jan 2020 18:46:39 +0100 Subject: [PATCH 1/3] Ticket 8848: Fix various typos causing issues on db migration --- .../1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql index 35ae92a287..1e433763e1 100644 --- a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql +++ b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql @@ -22,8 +22,8 @@ ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255); -- ALTER TABLE /*prefix*/testplan_platforms ADD COLUMN active tinyint(1) NOT NULL default '1'; -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0', -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1', +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0'; +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1'; CREATE TABLE /*prefix*/testcase_platforms ( @@ -41,11 +41,11 @@ CREATE TABLE /*prefix*/baseline_l1l2_context ( id int(10) unsigned NOT NULL AUTO_INCREMENT, testplan_id int(10) unsigned NOT NULL DEFAULT '0', platform_id int(10) unsigned NOT NULL DEFAULT '0', - being_exec_ts timestamp NOT NULL, + begin_exec_ts timestamp NOT NULL, end_exec_ts timestamp NOT NULL, creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), - UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts), + UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts) ) DEFAULT CHARSET=utf8; @@ -123,4 +123,4 @@ E.* FROM /*prefix*/executions E JOIN /*prefix*/testplans TPL on TPL.id=E.testplan_id JOIN /*prefix*/nodes_hierarchy NHTPL on NHTPL.id = TPL.id); -# END \ No newline at end of file +# END From e0f52961e721b6db5615dd6c70cd3b9d0f1b5706 Mon Sep 17 00:00:00 2001 From: heuj <58398276+heuj@users.noreply.github.com> Date: Tue, 21 Jan 2020 07:34:18 +0100 Subject: [PATCH 2/3] Update db_schema_update.sql --- .../1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql index 1e433763e1..89ce753b56 100644 --- a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql +++ b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql @@ -41,8 +41,8 @@ CREATE TABLE /*prefix*/baseline_l1l2_context ( id int(10) unsigned NOT NULL AUTO_INCREMENT, testplan_id int(10) unsigned NOT NULL DEFAULT '0', platform_id int(10) unsigned NOT NULL DEFAULT '0', - begin_exec_ts timestamp NOT NULL, - end_exec_ts timestamp NOT NULL, + begin_exec_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + end_exec_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts) From 4bb80ac7f4325182fb562430e7e6452a7924523c Mon Sep 17 00:00:00 2001 From: heuj <58398276+heuj@users.noreply.github.com> Date: Tue, 21 Jan 2020 07:35:55 +0100 Subject: [PATCH 3/3] Update testlink_create_tables.sql --- install/sql/mysql/testlink_create_tables.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/sql/mysql/testlink_create_tables.sql b/install/sql/mysql/testlink_create_tables.sql index 949fe27af8..7ba1faf623 100644 --- a/install/sql/mysql/testlink_create_tables.sql +++ b/install/sql/mysql/testlink_create_tables.sql @@ -802,8 +802,8 @@ CREATE TABLE /*prefix*/baseline_l1l2_context ( id int(10) unsigned NOT NULL AUTO_INCREMENT, testplan_id int(10) unsigned NOT NULL DEFAULT '0', platform_id int(10) unsigned NOT NULL DEFAULT '0', - being_exec_ts timestamp NOT NULL, - end_exec_ts timestamp NOT NULL, + begin_exec_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + end_exec_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)