|
4 | 4 | exit; |
5 | 5 | } |
6 | 6 |
|
7 | | -$sql = " |
8 | | - CREATE TABLE `__PREFIX__root_locator_addresses` ( |
9 | | - `addressID` int(11) unsigned NOT NULL AUTO_INCREMENT, |
10 | | - `addressTitle` varchar(255) NOT NULL DEFAULT '', |
11 | | - `addressBuilding` varchar(255) DEFAULT '', |
12 | | - `addressStreet` varchar(255) DEFAULT '', |
13 | | - `addressTown` varchar(255) DEFAULT '', |
14 | | - `addressRegion` varchar(255) DEFAULT '', |
15 | | - `addressPostcode` varchar(15) DEFAULT '', |
16 | | - `addressCountry` varchar(3) DEFAULT '', |
17 | | - `addressLatitude` decimal(9,6), |
18 | | - `addressLongitude` decimal(9,6), |
19 | | - `addressError` varchar(255), |
20 | | - `addressDynamicFields` text, |
21 | | - `addressUpdated` datetime NOT NULL, |
22 | | - PRIMARY KEY (`addressID`), |
23 | | - FULLTEXT KEY `root_locator_search_index` (`addressTitle`,`addressBuilding`,`addressStreet`,`addressPostcode`) |
24 | | - ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; |
25 | | - |
26 | | - CREATE TABLE `__PREFIX__root_locator_index` ( |
27 | | - `indexID` int(10) NOT NULL AUTO_INCREMENT, |
28 | | - `itemKey` char(64) NOT NULL DEFAULT '-', |
29 | | - `itemID` int(10) NOT NULL DEFAULT '0', |
30 | | - `indexKey` char(64) NOT NULL DEFAULT '-', |
31 | | - `indexValue` char(255) NOT NULL DEFAULT '', |
32 | | - PRIMARY KEY (`indexID`), |
33 | | - KEY `idx_fk` (`itemKey`,`itemID`), |
34 | | - KEY `idx_key` (`indexKey`), |
35 | | - KEY `idx_key_val` (`indexKey`,`indexValue`), |
36 | | - KEY `idx_keys` (`itemKey`,`indexKey`) |
37 | | - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
38 | | - |
39 | | - CREATE TABLE `__PREFIX__root_locator_tasks` ( |
40 | | - `taskID` int(11) unsigned NOT NULL AUTO_INCREMENT, |
41 | | - `taskKey` VARCHAR(255) NOT NULL, |
42 | | - `addressID` int(11) unsigned NOT NULL, |
43 | | - `taskAttempt` int(1) unsigned NOT NULL DEFAULT 1, |
44 | | - `taskStart` datetime NOT NULL, |
45 | | - PRIMARY KEY (`taskID`) |
46 | | - ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; |
47 | | -"; |
48 | | - |
| 7 | +$sql = file_get_contents(__DIR__ . '/sql/schema.sql'); |
| 8 | +$sql = file_get_contents(__DIR__ . '/sql/3.0.0.sql'); |
49 | 9 | $sql = str_replace('__PREFIX__', PERCH_DB_PREFIX, $sql); |
50 | 10 |
|
51 | 11 | // Install |
|
0 commit comments