Revert Mail Queue Query Change, update the db structure to include new fields
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ file_put_contents($lock_file_path, "Locked");
|
|||||||
|
|
||||||
// Get Mail Queue that has status of Queued and send it to the function sendSingleEmail() located in functions.php
|
// Get Mail Queue that has status of Queued and send it to the function sendSingleEmail() located in functions.php
|
||||||
|
|
||||||
$sql_queue = mysqli_query($mysqli, "SELECT * FROM email_queue WHERE email_status = 0");
|
$sql_queue = mysqli_query($mysqli, "SELECT * FROM email_queue WHERE email_status = 0 AND email_queued_at <= NOW()");
|
||||||
|
|
||||||
if (mysqli_num_rows($sql_queue) > 0) {
|
if (mysqli_num_rows($sql_queue) > 0) {
|
||||||
while ($row = mysqli_fetch_array($sql_queue)) {
|
while ($row = mysqli_fetch_array($sql_queue)) {
|
||||||
|
|||||||
@@ -535,6 +535,7 @@ CREATE TABLE `email_queue` (
|
|||||||
`email_from_name` varchar(255) NOT NULL,
|
`email_from_name` varchar(255) NOT NULL,
|
||||||
`email_subject` varchar(255) NOT NULL,
|
`email_subject` varchar(255) NOT NULL,
|
||||||
`email_content` longtext NOT NULL,
|
`email_content` longtext NOT NULL,
|
||||||
|
`email_cal_str` varchar(1024) DEFAULT NULL,
|
||||||
`email_queued_at` datetime NOT NULL DEFAULT current_timestamp(),
|
`email_queued_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
`email_failed_at` datetime DEFAULT NULL,
|
`email_failed_at` datetime DEFAULT NULL,
|
||||||
`email_attempts` tinyint(1) NOT NULL DEFAULT 0,
|
`email_attempts` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
@@ -1573,7 +1574,8 @@ CREATE TABLE `tickets` (
|
|||||||
`ticket_priority` varchar(200) DEFAULT NULL,
|
`ticket_priority` varchar(200) DEFAULT NULL,
|
||||||
`ticket_status` varchar(200) NOT NULL,
|
`ticket_status` varchar(200) NOT NULL,
|
||||||
`ticket_billable` tinyint(1) NOT NULL DEFAULT 0,
|
`ticket_billable` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`ticket_schedule` DATETIME DEFAULT NULL,
|
`ticket_schedule` datetime DEFAULT NULL,
|
||||||
|
`ticket_onsite` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`ticket_vendor_ticket_number` varchar(255) DEFAULT NULL,
|
`ticket_vendor_ticket_number` varchar(255) DEFAULT NULL,
|
||||||
`ticket_feedback` varchar(200) DEFAULT NULL,
|
`ticket_feedback` varchar(200) DEFAULT NULL,
|
||||||
`ticket_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
`ticket_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
@@ -1765,4 +1767,4 @@ CREATE TABLE `vendors` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-02-05 21:00:37
|
-- Dump completed on 2024-02-10 14:33:52
|
||||||
|
|||||||
Reference in New Issue
Block a user