X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mysql.sql;h=ebe59936a5b489b4d939b3048a1ab88f4d067093;hb=4dcb88a76a3de466ee6116ae0852f53ba2b259a5;hp=61b39098c754180772ea6a3c10627ffb60a31fa8;hpb=18e4849ef89b32f8aad1d42f5284bf60d5dc853d;p=timetracker.git diff --git a/mysql.sql b/mysql.sql index 61b39098..ebe59936 100644 --- a/mysql.sql +++ b/mysql.sql @@ -13,27 +13,32 @@ # This table stores settings common to all team members such as language, week start day, etc. # 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 - `lang` varchar(10) NOT NULL default 'en', # language - `date_format` varchar(20) NOT NULL default '%Y-%m-%d', # date format - `time_format` varchar(20) NOT NULL default '%H:%M', # time format - `week_start` smallint(2) NOT NULL default 0, # Week start day, 0 == Sunday. - `tracking_mode` smallint(2) NOT NULL default 1, # tracking mode ("time", "projects" or "projects and tasks") - `project_required` smallint(2) NOT NULL default 0, # whether a project selection is required or optional - `task_required` smallint(2) NOT NULL default 0, # whether a task selection is required or optional - `record_type` smallint(2) NOT NULL default 0, # time record type ("start and finish", "duration", or both) - `bcc_email` varchar(100) default NULL, # bcc email to copy all reports to - `plugins` varchar(255) default NULL, # a list of enabled plugins for team - `lock_spec` varchar(255) default NULL, # Cron specification for record locking, - # for example: "0 10 * * 1" for "weekly on Mon at 10:00". - `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 - `status` tinyint(4) default 1, # team status + `id` int(11) NOT NULL auto_increment, # team id + `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 + `lang` varchar(10) NOT NULL default 'en', # language + `date_format` varchar(20) NOT NULL default '%Y-%m-%d', # date format + `time_format` varchar(20) NOT NULL default '%H:%M', # time format + `week_start` smallint(2) NOT NULL default 0, # Week start day, 0 == Sunday. + `tracking_mode` smallint(2) NOT NULL default 1, # tracking mode ("time", "projects" or "projects and tasks") + `project_required` smallint(2) NOT NULL default 0, # whether a project selection is required or optional + `task_required` smallint(2) NOT NULL default 0, # whether a task selection is required or optional + `record_type` smallint(2) NOT NULL default 0, # time record type ("start and finish", "duration", or both) + `bcc_email` varchar(100) default NULL, # bcc email to copy all reports to + `plugins` varchar(255) default NULL, # a list of enabled plugins for team + `lock_spec` varchar(255) default NULL, # Cron specification for record locking, + # for example: "0 10 * * 1" for "weekly on Mon at 10:00". + `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 @@ -222,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 ); @@ -446,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.64', 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.