X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mysql.sql;h=62c1d7c4823483a3b39bcabaaa10e0e3028696ae;hb=bd92aeb3404ed8625272abccc9a8766f13ab75e6;hp=37ad65e760237da0276e6033540b748875c75c9b;hpb=83987222fbafb8d6dbbbd9578ed2f949f65004d3;p=timetracker.git diff --git a/mysql.sql b/mysql.sql index 37ad65e7..62c1d7c4 100644 --- a/mysql.sql +++ b/mysql.sql @@ -178,6 +178,7 @@ create index task_idx on tt_project_task_binds(task_id); CREATE TABLE `tt_log` ( `id` bigint NOT NULL auto_increment, # time record id `user_id` int(11) NOT NULL, # user id + `group_id` int(11) default NULL, # group id `date` date NOT NULL, # date the record is for `start` time default NULL, # record start time (for example, 09:00) `duration` time default NULL, # record duration (for example, 1 hour) @@ -201,6 +202,7 @@ CREATE TABLE `tt_log` ( # Create indexes on tt_log for performance. create index date_idx on tt_log(date); create index user_idx on tt_log(user_id); +create index group_idx on tt_log(group_id); create index client_idx on tt_log(client_id); create index invoice_idx on tt_log(invoice_id); create index project_idx on tt_log(project_id); @@ -265,6 +267,7 @@ CREATE TABLE `tt_fav_reports` ( `show_end` tinyint(4) NOT NULL default 0, # whether to show end field `show_note` tinyint(4) NOT NULL default 0, # whether to show note column `show_custom_field_1` tinyint(4) NOT NULL default 0, # whether to show custom field 1 + `show_work_units` tinyint(4) NOT NULL default 0, # whether to show work units `show_totals_only` tinyint(4) NOT NULL default 0, # whether to show totals only `group_by` varchar(20) default NULL, # group by field `status` tinyint(4) default 1, # favorite report status @@ -386,6 +389,7 @@ CREATE TABLE `tt_expense_items` ( `id` bigint NOT NULL auto_increment, # expense item id `date` date NOT NULL, # date the record is for `user_id` int(11) NOT NULL, # user id the expense item is reported by + `group_id` int(11) default NULL, # group id `client_id` int(11) default NULL, # client id `project_id` int(11) default NULL, # project id `name` text NOT NULL, # expense item name (what is an expense for) @@ -405,6 +409,7 @@ CREATE TABLE `tt_expense_items` ( # Create indexes on tt_expense_items for performance. create index date_idx on tt_expense_items(date); create index user_idx on tt_expense_items(user_id); +create index group_idx on tt_expense_items(group_id); create index client_idx on tt_expense_items(client_id); create index project_idx on tt_expense_items(project_id); create index invoice_idx on tt_expense_items(invoice_id); @@ -449,4 +454,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.88', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.97', now()); # TODO: change when structure changes.