diff --git a/app/Models/db_upgrades/db_5.2.0.php b/app/Models/db_upgrades/db_5.2.0.php index 9ad67403a..0c7cdfd01 100644 --- a/app/Models/db_upgrades/db_5.2.0.php +++ b/app/Models/db_upgrades/db_5.2.0.php @@ -1,6 +1,20 @@ fieldExists('user_id', 'change_log')) { + $sql = "ALTER TABLE `change_log` DROP `user_id`"; + $db->query($sql); + $output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; + log_message('info', (string)$db->getLastQuery()); +} + +if (!$db->fieldExists('ack_by', 'change_log')) { + $sql = "ALTER TABLE `change_log` ADD `ack_by` varchar(200) NOT NULL DEFAULT ''"; + $db->query($sql); + $output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; + log_message('info', (string)$db->getLastQuery()); +} + $sql = "DELETE FROM `configuration` WHERE `name` IN ('product', 'oae_product')"; $db->query($sql); $output .= str_replace("\n", " ", (string)$db->getLastQuery()) . "\n\n"; diff --git a/other/open-audit.sql b/other/open-audit.sql index c1b8491a7..9c1a810c7 100644 --- a/other/open-audit.sql +++ b/other/open-audit.sql @@ -557,7 +557,7 @@ CREATE TABLE `change_log` ( `db_row` int(10) unsigned NOT NULL DEFAULT '0', `db_action` enum('','create','update','delete') NOT NULL DEFAULT '', `details` text NOT NULL, - `user_id` int(10) unsigned DEFAULT NULL, + `ack_by` varchar(200) NOT NULL DEFAULT '', `ack_time` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', `external_link` varchar(200) NOT NULL DEFAULT '', `external_ident` varchar(200) NOT NULL DEFAULT '',