]> wagnertech.de Git - timetracker.git/blobdiff - dbinstall.php
Added plugin where users monthly quota can be set and tracked by users.
[timetracker.git] / dbinstall.php
index 39c967aee1835d8c49f17bf87bb3ba622da626f6..8964d934eb251d0fccdaef2a59d7247f29756951 100644 (file)
@@ -519,6 +519,10 @@ if ($_POST) {
     setChange("ALTER TABLE tt_teams ADD COLUMN lock_spec varchar(255) default NULL");
     setChange("ALTER TABLE tt_teams DROP locktime");
   }
+  
+  if ($_POST["convert1900to1930"]){
+    setChange("CREATE TABLE `timetracker`.`tt_monthly_quota` ( `year` SMALLINT UNSIGNED NOT NULL , `month` TINYINT UNSIGNED NOT NULL , `quota` SMALLINT UNSIGNED NOT NULL , PRIMARY KEY (`year`, `month`))");
+  }
 
   // The update_clients function updates projects field in tt_clients table.
   if ($_POST["update_clients"]) {
@@ -622,7 +626,7 @@ if ($_POST) {
 <h2>DB Install</h2>
 <table width="80%" border="1" cellpadding="10" cellspacing="0">
   <tr>
-    <td width="80%"><b>Create database structure (v1.9)</b>
+    <td width="80%"><b>Create database structure (v1.9.30)</b>
     <br>(applies only to new installations, do not execute when updating)</br></td><td><input type="submit" name="crstructure" value="Create"></td>
   </tr>
 </table>
@@ -657,6 +661,10 @@ if ($_POST) {
     <td>Update database structure (v1.6 to v1.9)</td>
     <td><input type="submit" name="convert1600to1900" value="Update"><br></td>
   </tr>
+  <tr valign="top">
+    <td>Update database structure (v1.9 to v1.9.30)</td>
+    <td><input type="submit" name="convert1900to1930" value="Update"><br></td>
+  </tr>
 </table>
 
 <h2>DB Maintenance</h2>