Feature: Part 1 - DB Schemea update for Default Hourly Rate

This commit is contained in:
johnnyq 2023-11-06 14:52:01 -05:00
parent 69e9691de9
commit 1f0d2ff1ab
3 changed files with 13 additions and 5 deletions

View File

@ -1491,11 +1491,18 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
}
//if (CURRENT_DATABASE_VERSION == '0.9.1') {
// Insert queries here required to update to DB version 0.9.0
if (CURRENT_DATABASE_VERSION == '0.9.3') {
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_default_hourly_rate` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `config_default_net_terms`");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.4'");
}
//if (CURRENT_DATABASE_VERSION == '0.9.4') {
// Insert queries here required to update to DB version 0.9.5
// Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.2'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.5'");
//}
} else {
// Up-to-date

View File

@ -5,5 +5,5 @@
* It is used in conjunction with database_updates.php
*/
DEFINE("LATEST_DATABASE_VERSION", "0.9.3");
DEFINE("LATEST_DATABASE_VERSION", "0.9.4");

3
db.sql
View File

@ -1233,6 +1233,7 @@ CREATE TABLE `settings` (
`config_default_expense_payment_method` varchar(200) DEFAULT NULL,
`config_default_calendar` int(11) DEFAULT NULL,
`config_default_net_terms` int(11) DEFAULT NULL,
`config_default_hourly_rate` decimal(15,2) NOT NULL DEFAULT 0.00,
`config_invoice_prefix` varchar(200) DEFAULT NULL,
`config_invoice_next_number` int(11) DEFAULT NULL,
`config_invoice_footer` text DEFAULT NULL,
@ -1744,4 +1745,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-10-20 14:53:11
-- Dump completed on 2023-11-06 14:51:28