X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mysql.sql;h=df34b7759f0718afe567f5db04eb937ccbff2a35;hb=e59d57b1fcf105382028dcfc0157a6ca84b0dc46;hp=6a7637166893dfeea81620fe6f300d88997025db;hpb=7ae701986bfb6d16f661becd5157d5a062db625f;p=timetracker.git diff --git a/mysql.sql b/mysql.sql index 6a763716..df34b775 100644 --- a/mysql.sql +++ b/mysql.sql @@ -14,7 +14,6 @@ # CREATE TABLE `tt_teams` ( `id` int(11) NOT NULL auto_increment, # team id - `timestamp` timestamp default CURRENT_TIMESTAMP, # Modification timestamp. TODO: redo all timestamps to survive beyond 2038. `name` varchar(80) default NULL, # team name `currency` varchar(7) default NULL, # team currency symbol `decimal_mark` char(1) NOT NULL default '.', # separator in decimals @@ -33,6 +32,12 @@ CREATE TABLE `tt_teams` ( `workday_minutes` smallint(4) default 480, # number of work minutes in a regular working day `custom_logo` tinyint(4) default 0, # whether to use a custom logo or not `config` text default NULL, # miscellaneous team configuration settings + `created` datetime default NULL, # creation timestamp + `created_ip` varchar(45) default NULL, # creator ip + `created_by` int(11) default NULL, # creator user_id + `modified` datetime default NULL, # modification timestamp + `modified_ip` varchar(45) default NULL, # modifier ip + `modified_by` int(11) default NULL, # modifier user_id `status` tinyint(4) default 1, # team status PRIMARY KEY (`id`) ); @@ -74,7 +79,6 @@ INSERT INTO `tt_roles` (`team_id`, `name`, `rank`, `rights`) VALUES (0, 'Top man # CREATE TABLE `tt_users` ( `id` int(11) NOT NULL auto_increment, # user id - `timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp `login` varchar(50) COLLATE utf8_bin NOT NULL, # user login `password` varchar(50) default NULL, # password hash `name` varchar(100) default NULL, # user name @@ -171,7 +175,6 @@ create index task_idx on tt_project_task_binds(task_id); # CREATE TABLE `tt_log` ( `id` bigint NOT NULL auto_increment, # time record id - `timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp `user_id` int(11) NOT NULL, # user id `date` date NOT NULL, # date the record is for `start` time default NULL, # record start time (for example, 09:00) @@ -223,7 +226,7 @@ create unique index name_idx on tt_invoices(team_id, name, status); # Structure for table tt_tmp_refs. Used for reset password mechanism. # CREATE TABLE `tt_tmp_refs` ( - `timestamp` timestamp default CURRENT_TIMESTAMP, # creation timestamp + `created` datetime default NULL, # creation timestamp `ref` char(32) NOT NULL default '', # unique reference for user, used in urls `user_id` int(11) NOT NULL # user id ); @@ -447,4 +450,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.59', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.67', now()); # TODO: change when structure changes.