#59: Added alter table statement for a user's active flag

merge-requests/2/head
Mike Koch 10 years ago
parent 1ec604f94c
commit 6c3237c58c

@ -61,21 +61,23 @@ if ($_GET['update'] == 1)
`RangeEnd` VARCHAR(100) NOT NULL)");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL);");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `parent` MEDIUMINT(8) NULL AFTER `custom20`;");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `active` BIT NOT NULL DEFAULT 1 AFTER `autorefresh`");
}
}
?>
<html>
<head>
<title>NuMods 1.4.1 Install / Upgrade</title>
<title>NuMods 1.5.0 Install / Upgrade</title>
</head>
<body>
<div style="display: <?php echo $showInstructions; ?>">
<h1>Update NuMods from v1.2.4 - v1.3.0 to v1.4.1</h1>
<h1>Update NuMods from v1.4.1 to v1.5.0</h1>
<p><a href="#">Update here</a>. <b>Do not use the installation below!</b> </p>
<h1>Update NuMods from v1.2.4 - v1.3.0 to v1.5.0</h1>
<p>If you attempted the v1.4.0 installation and it failed, use <a href="updateTo1-4-1.php?ar=true">this update link</a>. Do not use the link below!</p>
<p><a href="updateTo1-4-1.php">Update here</a>. <b>Do not use the installation below!</b></p>
<h1>Install NuMods v1.4.1 <b>for the first time</b></h1>
<h1>Install NuMods v1.5.0 <b>for the first time</b></h1>
<h4><i>If you have not yet installed/updated HESK, please do so first before continuing; otherwise installation will <b>fail</b>!</i></h4>
<br/>
<p>Please verify the database information below. Additionally, ensure that the database user has CREATE and ALTER permissions.</p>

@ -14,7 +14,5 @@ if (!isset($_GET['ar'])) {
}
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL);");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `parent` MEDIUMINT(8) NULL AFTER `custom20`;");
?>
<h1>Update complete!</h1>
<p>Please delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>
header('Location: updateTo1-5-0.php');

@ -0,0 +1,11 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `active` BIT NOT NULL DEFAULT 1 AFTER `autorefresh`");
?>
<h1>Update complete!</h1>
<p>Please delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>
Loading…
Cancel
Save