X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mysql.sql;h=bfa26a0daa69ecde868789449938a988593275bf;hb=ee95ed0e72258b76ed0280f04d6846d802aefa12;hp=62c1d7c4823483a3b39bcabaaa10e0e3028696ae;hpb=0d76b58c818306b35261dd21fd998b9f5fb0a903;p=timetracker.git diff --git a/mysql.sql b/mysql.sql index 62c1d7c4..bfa26a0d 100644 --- a/mysql.sql +++ b/mysql.sql @@ -85,6 +85,7 @@ CREATE TABLE `tt_users` ( `password` varchar(50) default NULL, # password hash `name` varchar(100) default NULL, # user name `group_id` int(11) NOT NULL, # group id + `org_id` int(11) default NULL, # organization id `role_id` int(11) default NULL, # role id `client_id` int(11) default NULL, # client id for "client" user role `rate` float(6,2) NOT NULL default '0.00', # default hourly rate @@ -104,7 +105,7 @@ CREATE TABLE `tt_users` ( # Create an index that guarantees unique active and inactive logins. create unique index login_idx on tt_users(login, status); -# Create admin account with password 'secret'. Admin is a superuser, who can create groupd. +# Create admin account with password 'secret'. Admin is a superuser who can create groups. DELETE from `tt_users` WHERE login = 'admin'; INSERT INTO `tt_users` (`login`, `password`, `name`, `group_id`, `role_id`) VALUES ('admin', md5('secret'), 'Admin', '0', (select id from tt_roles where rank = 1024)); @@ -269,7 +270,9 @@ CREATE TABLE `tt_fav_reports` ( `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 + `group_by1` varchar(20) default NULL, # group by field 1 + `group_by2` varchar(20) default NULL, # group by field 2 + `group_by3` varchar(20) default NULL, # group by field 3 `status` tinyint(4) default 1, # favorite report status PRIMARY KEY (`id`) ); @@ -380,6 +383,8 @@ CREATE TABLE `tt_custom_field_log` ( PRIMARY KEY (`id`) ); +create index log_idx on tt_custom_field_log(log_id); + # # Structure for table tt_expense_items. @@ -454,4 +459,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.97', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.07', now()); # TODO: change when structure changes.