-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.php
39 lines (35 loc) · 1.44 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
<?php
/**
* This function is called on installation and is used to create database schema for the plugin
*/
function extension_install_runningdatabaseinstances()
{
$commonObject = new ExtensionCommon;
$commonObject->sqlQuery("CREATE TABLE IF NOT EXISTS `dbinstances` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`HARDWARE_ID` INT(11) NOT NULL,
`PUBLISHER` VARCHAR(255) NULL DEFAULT NULL,
`VERSION_NAME` VARCHAR(255) NULL DEFAULT NULL,
`VERSION` VARCHAR(255) NULL DEFAULT NULL,
`EDITION` VARCHAR(255) NULL DEFAULT NULL,
`INSTANCE` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`ID`,`HARDWARE_ID`),
INDEX `VERSION_NAME` (`VERSION_NAME`),
INDEX `VERSION` (`VERSION`),
INDEX `ID` (`ID`)
) COLLATE='utf8_general_ci' ENGINE=INNODB ROW_FORMAT=DEFAULT;");
}
/**
* This function is called on removal and is used to destroy database schema for the plugin
*/
function extension_delete_runningdatabaseinstances()
{
$commonObject = new ExtensionCommon;
$commonObject->sqlQuery("DROP TABLE `dbinstances`");
}
/**
* This function is called on plugin upgrade
*/
function extension_upgrade_runningdatabaseinstances()
{
}