Added group_id and org_id in tt_client_project_binds table.
[timetracker.git] / mysql.sql
index e3f0bd8..705e664 100644 (file)
--- a/mysql.sql
+++ b/mysql.sql
@@ -333,8 +333,10 @@ create unique index client_name_idx on tt_clients(group_id, name, status);
 # Structure for table tt_client_project_binds. This table maps clients to assigned projects.
 #
 CREATE TABLE `tt_client_project_binds` (
-  `client_id` int(11) NOT NULL, # client id
-  `project_id` int(11) NOT NULL # project id
+  `client_id` int(11) NOT NULL,                    # client id
+  `project_id` int(11) NOT NULL,                   # project id
+  `group_id` int(11) default NULL,                 # group id
+  `org_id` int(11) default NULL                    # organization id
 );
 
 # Indexes for tt_client_project_binds.
@@ -476,4 +478,4 @@ CREATE TABLE `tt_site_config` (
   PRIMARY KEY  (`param_name`)
 );
 
-INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.20', now()); # TODO: change when structure changes.
+INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.21', now()); # TODO: change when structure changes.