]> wagnertech.de Git - timetracker.git/commitdiff
Added an index to tt_client_project_binds to guarantee uniqueness.
authorNik Okuntseff <support@anuko.com>
Mon, 19 Nov 2018 17:01:51 +0000 (17:01 +0000)
committerNik Okuntseff <support@anuko.com>
Mon, 19 Nov 2018 17:01:51 +0000 (17:01 +0000)
WEB-INF/templates/footer.tpl
dbinstall.php
mysql.sql

index 8d292fc5d5a890089d0d1d4565c5e157c4061456..cab56b71c10531f904ef34ae1b5d3590ed0b0a47 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.21.4461 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.21.4462 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index bfbb5c2c181a4124840d138834d09d45c6b636e2..602449145dfd272152eb96d7007b94cc6fb2d009 100644 (file)
@@ -1021,6 +1021,7 @@ if ($_POST) {
     setChange("ALTER TABLE `tt_client_project_binds` ADD `org_id` int(11) default NULL AFTER `group_id`");
     setChange("update `tt_client_project_binds` cpb inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.20') inner join `tt_clients` c on c.id = cpb.client_id set cpb.group_id = c.group_id, cpb.org_id = c.org_id where cpb.org_id is null");
     setChange("UPDATE `tt_site_config` SET param_value = '1.18.21', modified = now() where param_name = 'version_db' and param_value = '1.18.20'");
+    setChange("create unique index client_project_idx on tt_client_project_binds(client_id, project_id)");
   }
 
   if ($_POST["cleanup"]) {
index 705e664f1854836921eeaa02b301885e582bce88..bc970f734b6721df6cc882d4f7c817d4baeb4641 100644 (file)
--- a/mysql.sql
+++ b/mysql.sql
@@ -342,6 +342,7 @@ CREATE TABLE `tt_client_project_binds` (
 # Indexes for tt_client_project_binds.
 create index client_idx on tt_client_project_binds(client_id);
 create index project_idx on tt_client_project_binds(project_id);
+create unique index client_project_idx on tt_client_project_binds(client_id, project_id);
 
 
 #