From 9f1645d698cfa8dc50dbbb0817d6660ce9d1bd56 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Mon, 7 Apr 2025 12:54:53 -0400 Subject: [PATCH 1/2] remove "events" --- resources/lib/UnitySQL.php | 13 ------------- tools/docker-dev/sql/bootstrap.sql | 26 -------------------------- 2 files changed, 39 deletions(-) diff --git a/resources/lib/UnitySQL.php b/resources/lib/UnitySQL.php index 904ea2fd..8a82bb2c 100644 --- a/resources/lib/UnitySQL.php +++ b/resources/lib/UnitySQL.php @@ -10,7 +10,6 @@ class UnitySQL private const TABLE_NOTICES = "notices"; private const TABLE_SSOLOG = "sso_log"; private const TABLE_PAGES = "pages"; - private const TABLE_EVENTS = "events"; private const TABLE_AUDIT_LOG = "audit_log"; private const TABLE_ACCOUNT_DELETION_REQUESTS = "account_deletion_requests"; private const TABLE_SITEVARS = "sitevars"; @@ -234,18 +233,6 @@ public function editPage($id, $content, $operator) ); } - public function addEvent($operator, $action, $entity) - { - $stmt = $this->conn->prepare( - "INSERT INTO " . self::TABLE_EVENTS . " (operator, action, entity) VALUE (:operator, :action, :entity)" - ); - $stmt->bindParam(":operator", $operator); - $stmt->bindParam(":action", $action); - $stmt->bindParam(":entity", $entity); - - $stmt->execute(); - } - // audit log table methods public function addLog($operator, $operator_ip, $action_type, $recipient) { diff --git a/tools/docker-dev/sql/bootstrap.sql b/tools/docker-dev/sql/bootstrap.sql index 53fdbb0b..926a383f 100644 --- a/tools/docker-dev/sql/bootstrap.sql +++ b/tools/docker-dev/sql/bootstrap.sql @@ -51,20 +51,6 @@ CREATE TABLE `audit_log` ( -- -------------------------------------------------------- --- --- Table structure for table `events` --- - -CREATE TABLE `events` ( - `id` int(11) NOT NULL, - `operator` varchar(128) NOT NULL, - `action` varchar(300) NOT NULL, - `entity` varchar(300) NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - -- -- Table structure for table `groupJoinRequests` -- @@ -234,12 +220,6 @@ ALTER TABLE `account_deletion_requests` ALTER TABLE `audit_log` ADD PRIMARY KEY (`id`); --- --- Indexes for table `events` --- -ALTER TABLE `events` - ADD PRIMARY KEY (`id`); - -- -- Indexes for table `groupJoinRequests` -- @@ -316,12 +296,6 @@ ALTER TABLE `account_deletion_requests` ALTER TABLE `audit_log` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `events` --- -ALTER TABLE `events` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - -- -- AUTO_INCREMENT for table `groupJoinRequests` -- From afc918f712aa565ae6345837c3d8d740920c7a16 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Mon, 7 Apr 2025 13:18:44 -0400 Subject: [PATCH 2/2] remove "sso_log" --- resources/lib/UnitySQL.php | 1 - tools/docker-dev/sql/bootstrap.sql | 28 ---------------------------- 2 files changed, 29 deletions(-) diff --git a/resources/lib/UnitySQL.php b/resources/lib/UnitySQL.php index 8a82bb2c..961397ca 100644 --- a/resources/lib/UnitySQL.php +++ b/resources/lib/UnitySQL.php @@ -8,7 +8,6 @@ class UnitySQL { private const TABLE_REQS = "requests"; private const TABLE_NOTICES = "notices"; - private const TABLE_SSOLOG = "sso_log"; private const TABLE_PAGES = "pages"; private const TABLE_AUDIT_LOG = "audit_log"; private const TABLE_ACCOUNT_DELETION_REQUESTS = "account_deletion_requests"; diff --git a/tools/docker-dev/sql/bootstrap.sql b/tools/docker-dev/sql/bootstrap.sql index 926a383f..379b2970 100644 --- a/tools/docker-dev/sql/bootstrap.sql +++ b/tools/docker-dev/sql/bootstrap.sql @@ -189,21 +189,6 @@ CREATE TABLE `sitevars` ( `value` varchar(768) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; --- -------------------------------------------------------- - --- --- Table structure for table `sso_log` --- - -CREATE TABLE `sso_log` ( - `id` int(10) NOT NULL, - `uid` varchar(300) NOT NULL, - `firstname` varchar(300) NOT NULL, - `lastname` varchar(300) NOT NULL, - `mail` varchar(300) NOT NULL, - `org` varchar(300) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - -- -- Indexes for dumped tables -- @@ -274,12 +259,6 @@ ALTER TABLE `requests` ALTER TABLE `sitevars` ADD PRIMARY KEY (`id`); --- --- Indexes for table `sso_log` --- -ALTER TABLE `sso_log` - ADD PRIMARY KEY (`id`); - -- -- AUTO_INCREMENT for dumped tables -- @@ -350,13 +329,6 @@ ALTER TABLE `requests` ALTER TABLE `sitevars` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `sso_log` --- -ALTER TABLE `sso_log` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -COMMIT; - /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;