-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.php
54 lines (45 loc) · 1.98 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* This function is called on installation and is used to create database schema for the plugin
*/
function extension_install_winupdate()
{
$commonObject = new ExtensionCommon;
$commonObject -> sqlQuery("DROP TABLE `winupdatestate`");
$commonObject -> sqlQuery("CREATE TABLE `winupdatestate` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`HARDWARE_ID` INT(11) NOT NULL,
`KB` VARCHAR(255) DEFAULT NULL,
`TITLE` VARCHAR(255) DEFAULT NULL,
`DATE` VARCHAR(255) DEFAULT NULL,
`OPERATION` VARCHAR(255) DEFAULT NULL,
`STATUS` VARCHAR(255) DEFAULT NULL,
`SUPPORTLINK` VARCHAR(255) DEFAULT NULL,
`DESCRIPTION` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`ID`,`HARDWARE_ID`)
) ENGINE=INNODB ;");
$commonObject -> sqlQuery("DROP TABLE `winupdatescan`");
$commonObject -> sqlQuery("CREATE TABLE `winupdatescan` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`HARDWARE_ID` INT(11) NOT NULL,
`TITLE` VARCHAR(255) DEFAULT NULL,
`LASTSCANDATE` VARCHAR(255) DEFAULT NULL,
`LASTINSTALLATIONDATE` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`ID`,`HARDWARE_ID`)
) ENGINE=INNODB ;");
}
/**
* This function is called on removal and is used to destroy database schema for the plugin
*/
function extension_delete_winupdate()
{
$commonObject = new ExtensionCommon;
$commonObject -> sqlQuery("DROP TABLE `winupdatestate`");
$commonObject -> sqlQuery("DROP TABLE `winupdatescan`");
}
/**
* This function is called on plugin upgrade
*/
function extension_upgrade_winupdate()
{
}