Files
itflow/admin/database_updates/4.3.2.php

42 lines
2.4 KiB
PHP

<?php
/*
* ITFlow - Database update to version 4.3.2 (from 4.3.1)
* Included by admin/database_updates.php - do not access directly
*
* Email the ticket mailbox couldn't take - from someone who isn't a contact, at a domain no client has, with
* unknown senders off, or one that failed - is kept for agents to sort (functions/mail_unprocessed.php), where it
* was left flagged in the mailbox, out of sight:
* email_unprocessed - the email (its file under uploads/mail_unprocessed/), why it wasn't taken, what an agent
* asked for (a ticket, a reply on one, another try, or dismissed) and what came of it
*
* Re-runnable: the table is made only where it isn't there.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
mysqli_query($mysqli, "CREATE TABLE IF NOT EXISTS `email_unprocessed` (
`email_unprocessed_id` int(11) NOT NULL AUTO_INCREMENT,
`email_unprocessed_message_id` varchar(255) NOT NULL DEFAULT '',
`email_unprocessed_from_email` varchar(255) NOT NULL DEFAULT '',
`email_unprocessed_from_name` varchar(255) NOT NULL DEFAULT '',
`email_unprocessed_subject` varchar(500) NOT NULL DEFAULT '',
`email_unprocessed_preview` varchar(500) NOT NULL DEFAULT '',
`email_unprocessed_received_at` datetime DEFAULT NULL,
`email_unprocessed_reason` varchar(500) NOT NULL DEFAULT '',
`email_unprocessed_file` varchar(255) NOT NULL DEFAULT '',
`email_unprocessed_action` varchar(20) NOT NULL DEFAULT '',
`email_unprocessed_action_client_id` int(11) NOT NULL DEFAULT 0,
`email_unprocessed_action_contact_id` int(11) NOT NULL DEFAULT 0,
`email_unprocessed_action_ticket_id` int(11) NOT NULL DEFAULT 0,
`email_unprocessed_action_add` tinyint(1) NOT NULL DEFAULT 0,
`email_unprocessed_action_by` int(11) NOT NULL DEFAULT 0,
`email_unprocessed_action_at` datetime DEFAULT NULL,
`email_unprocessed_done_at` datetime DEFAULT NULL,
`email_unprocessed_ticket_id` int(11) NOT NULL DEFAULT 0,
`email_unprocessed_created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`email_unprocessed_id`),
KEY `email_unprocessed_done_at` (`email_unprocessed_done_at`, `email_unprocessed_action`),
KEY `email_unprocessed_message_id` (`email_unprocessed_message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci");