From 189736b8f1f0190ffeaab175338583861800289b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Mar 2018 17:02:39 +0000 Subject: [PATCH] Renamed a field in database. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 2 ++ mysql.sql | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d4f8bb76..031e3c6f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.52.4098 | Copyright © Anuko | +  Anuko Time Tracker 1.17.53.4099 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 5b2f6c30..ae5ff704 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -823,6 +823,8 @@ if ($_POST) { setChange("ALTER TABLE `tt_users` ADD `accessed` datetime default NULL AFTER `modified_by`"); setChange("ALTER TABLE `tt_users` ADD `accessed_ip` varchar(45) default NULL AFTER `accessed`"); setChange("UPDATE `tt_site_config` SET param_value = '1.17.52' where param_name = 'version_db' and param_value = '1.17.51'"); + setChange("ALTER TABLE `tt_site_config` CHANGE `updated` `modified` datetime default NULL"); + setChange("UPDATE `tt_site_config` SET param_value = '1.17.53', modified = now() where param_name = 'version_db' and param_value = '1.17.52'"); } if ($_POST["cleanup"]) { diff --git a/mysql.sql b/mysql.sql index 6c2d0f52..07b17a29 100644 --- a/mysql.sql +++ b/mysql.sql @@ -83,14 +83,14 @@ CREATE TABLE `tt_users` ( `client_id` int(11) default NULL, # client id for "client" user role `rate` float(6,2) NOT NULL default '0.00', # default hourly rate `email` varchar(100) default NULL, # user email - `created_timestamp` timestamp default NULL, # creation timestamp + `created` datetime default NULL, # creation timestamp `created_ip` varchar(45) default NULL, # creation ip `created_by` int(11) default NULL, # creator user_id (null for self) - `modified_timestamp` timestamp default NULL, # modification timestamp + `modified` datetime default NULL, # modification timestamp `modified_ip` varchar(45) default NULL, # modification ip `modified_by` int(11) default NULL, # modifier user_id - `last_access_timestamp` timestamp default NULL, # last access timestamp - `last_access_ip` varchar(45) default NULL, # last access ip + `accessed` datetime default NULL, # last access timestamp + `accessed_ip` varchar(45) default NULL, # last access ip `status` tinyint(4) default 1, # user status PRIMARY KEY (`id`) ); @@ -429,9 +429,9 @@ ALTER TABLE `tt_monthly_quotas` CREATE TABLE `tt_site_config` ( `param_name` varchar(32) NOT NULL, # parameter name `param_value` text default NULL, # parameter value - `created` datetime default NULL, # creation time - `updated` datetime default NULL, # modification time + `created` datetime default NULL, # creation timestamp + `modified` datetime default NULL, # modification timestamp PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.52', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.53', now()); # TODO: change when structure changes. -- 2.20.1