mirror of
https://github.com/itflow-org/itflow
synced 2026-12-03 09:39:02 +00:00
21 lines
1.0 KiB
PHP
21 lines
1.0 KiB
PHP
<?php
|
|
|
|
/*
|
|
* ITFlow - Database update to version 4.4.0 (from 4.3.9)
|
|
* Included by admin/database_updates.php - do not access directly
|
|
*
|
|
* ticket_reply_drafts.draft_type - how an agent's unsent reply was to go: 0 internal note, 1 public note, 2 email
|
|
* reply, 3 text reply (the reply box's public_reply_type). The ticket page opens the reply box on it when the agent
|
|
* comes back (functions/ticket_reply_draft.php). NULL for a draft kept before this update - opened as an internal note.
|
|
*
|
|
* Re-runnable: the column is made only where it isn't there.
|
|
*/
|
|
|
|
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
|
|
|
$itflow_draft_type = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
|
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'ticket_reply_drafts' AND COLUMN_NAME = 'draft_type' LIMIT 1");
|
|
if (!$itflow_draft_type || mysqli_num_rows($itflow_draft_type) === 0) {
|
|
mysqli_query($mysqli, "ALTER TABLE `ticket_reply_drafts` ADD `draft_type` tinyint(1) DEFAULT NULL AFTER `draft_body`");
|
|
}
|