From 3aad2e8026cb10ffb075d4b3d76ee6213240942e Mon Sep 17 00:00:00 2001 From: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com> Date: Fri, 8 May 2026 11:27:08 +0200 Subject: [PATCH 1/2] Reorder activity data item columns in base schema --- db/cats_schema.sql | 2 +- test/data/securityTests.sql | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/cats_schema.sql b/db/cats_schema.sql index 5807a8888..6ff0d60f9 100755 --- a/db/cats_schema.sql +++ b/db/cats_schema.sql @@ -34,8 +34,8 @@ insert into `access_level`(`access_level_id`,`short_description`,`long_descript CREATE TABLE `activity` ( `activity_id` int(11) NOT NULL AUTO_INCREMENT, - `data_item_id` int(11) NOT NULL DEFAULT '0', `data_item_type` int(11) NOT NULL DEFAULT '0', + `data_item_id` int(11) NOT NULL DEFAULT '0', `joborder_id` int(11) DEFAULT NULL, `site_id` int(11) NOT NULL DEFAULT '0', `entered_by` int(11) NOT NULL DEFAULT '0', diff --git a/test/data/securityTests.sql b/test/data/securityTests.sql index c16d088eb..6125a9903 100644 --- a/test/data/securityTests.sql +++ b/test/data/securityTests.sql @@ -49,10 +49,10 @@ VALUES (60001, 60001, 100, 20000, 1, '2016-08-10 14:51:51'); INSERT INTO `activity` -(`activity_id`, `data_item_id`, `data_item_type`, `joborder_id`, `site_id`, `entered_by`, `date_created`, `type`, `notes`, `date_modified`) +(`activity_id`, `data_item_type`, `data_item_id`, `joborder_id`, `site_id`, `entered_by`, `date_created`, `type`, `notes`, `date_modified`) VALUES -(70001, 20000, 100, 40001, 1, 1, '2016-08-10 14:48:57', 400, 'Added candidate to job order.', '2016-08-10 14:48:57'), -(70002, 30001, 300, -1, 1, 1, '2016-08-10 15:04:48', 100, '', '2016-08-10 15:04:48'); +(70001, 100, 20000, 40001, 1, 1, '2016-08-10 14:48:57', 400, 'Added candidate to job order.', '2016-08-10 14:48:57'), +(70002, 300, 30001, -1, 1, 1, '2016-08-10 15:04:48', 100, '', '2016-08-10 15:04:48'); INSERT INTO `attachment` (`attachment_id`, `data_item_id`, `data_item_type`, `site_id`, `title`, `original_filename`, `stored_filename`, `content_type`, `resume`, `text`, `date_created`, `date_modified`, `profile_image`, `directory_name`, `md5_sum`, `file_size_kb`, `md5_sum_text`) From 0c9040994046dcd89606ec0078807e4022710a7e Mon Sep 17 00:00:00 2001 From: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com> Date: Fri, 8 May 2026 11:27:31 +0200 Subject: [PATCH 2/2] Add install schema migration for activity column order --- modules/install/Schema.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/install/Schema.php b/modules/install/Schema.php index 5562d4ccf..7e45ad29c 100755 --- a/modules/install/Schema.php +++ b/modules/install/Schema.php @@ -1447,6 +1447,11 @@ public static function get() SET short_description = \'Not reached\' WHERE activity_type_id = 100; ', + '377' => ' + ALTER TABLE `activity` + MODIFY COLUMN `data_item_type` int(11) NOT NULL DEFAULT \'0\' + AFTER `activity_id`; + ', ); }