Update DB Structure for the addition Email Notify to Recurring Invoices

This commit is contained in:
johnnyq 2024-04-12 19:38:13 -04:00
parent cc9abe5a09
commit ba66dbf887
3 changed files with 12 additions and 5 deletions

View File

@ -1874,10 +1874,16 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.7'");
}
// if (CURRENT_DATABASE_VERSION == '1.2.7') {
// // Insert queries here required to update to DB version 1.2.8
if (CURRENT_DATABASE_VERSION == '1.2.7') {
mysqli_query($mysqli, "ALTER TABLE `recurring` ADD `recurring_invoice_email_notify` TINYINT(1) NOT NULL DEFAULT 1 AFTER `recurring_note`");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.8'");
}
// if (CURRENT_DATABASE_VERSION == '1.2.8') {
// // Insert queries here required to update to DB version 1.2.9
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.8");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.9");
// }
} else {

View File

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

3
db.sql
View File

@ -1060,6 +1060,7 @@ CREATE TABLE `recurring` (
`recurring_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
`recurring_currency_code` varchar(200) NOT NULL,
`recurring_note` text DEFAULT NULL,
`recurring_invoice_email_notify` tinyint(1) NOT NULL DEFAULT 1,
`recurring_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`recurring_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`recurring_archived_at` datetime DEFAULT NULL,
@ -1901,4 +1902,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2024-04-10 13:20:42
-- Dump completed on 2024-04-12 19:37:23