From: anuko Date: Sun, 16 Oct 2016 21:55:15 +0000 (+0000) Subject: Version change for PR#23, fixed dbinstall.php for it to work. X-Git-Tag: timetracker_1.19-1~1627 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=eeb825a7f9950c781528b99772ccdd327869b819;p=timetracker.git Version change for PR#23, fixed dbinstall.php for it to work. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e5c7e2ba..33cf326a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.32.3542 | Copyright © Anuko | +  Anuko Time Tracker 1.9.33.3543 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 9f579947..255f944c 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -605,18 +605,7 @@ if ($_POST) { setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL"); - - setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, - `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, - - /* Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textarea. - Updated mysql.sql also. - Original: `name` varchar(255) NOT NULL, */ - `name` text NOT NULL, - - `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, - PRIMARY KEY (`id`))"); - + setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY (`id`))"); setChange("create index date_idx on tt_expense_items(date)"); setChange("create index user_idx on tt_expense_items(user_id)"); setChange("create index client_idx on tt_expense_items(client_id)"); @@ -644,6 +633,7 @@ if ($_POST) { setChange("ALTER TABLE `tt_monthly_quota` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE"); setChange("ALTER TABLE `tt_teams` ADD `workday_hours` SMALLINT NULL DEFAULT '8' AFTER `lock_spec`"); setChange("RENAME TABLE tt_monthly_quota TO tt_monthly_quotas"); + setChange("ALTER TABLE tt_expense_items modify `name` text NOT NULL"); } // The update_clients function updates projects field in tt_clients table. diff --git a/mysql.sql b/mysql.sql index 48a2b0d0..e373c3e9 100644 --- a/mysql.sql +++ b/mysql.sql @@ -326,11 +326,7 @@ CREATE TABLE `tt_expense_items` ( `user_id` int(11) NOT NULL, # user id the expense item is reported by `client_id` int(11) default NULL, # client id `project_id` int(11) default NULL, # project id - -# Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textareas. -# Original: `name` varchar(255) NOT NULL, # expense item name (what is an expense for) `name` text NOT NULL, # expense item name (what is an expense for) - `cost` decimal(10,2) default '0.00', # item cost (including taxes, etc.) `invoice_id` int(11) default NULL, # invoice id `status` tinyint(4) default '1', # item status