Changeset 7616 for extensions/GMaps/gmaps_install.class.inc.php
- Timestamp:
- Nov 4, 2010, 1:42:14 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/gmaps_install.class.inc.php
r7548 r7616 87 87 )", 88 88 "CREATE TABLE `".$this->tables['cache']."` ( 89 `requestId` mediumint(8) UNSIGNED NOT NULL default '0', 90 `imageId` mediumint(8) NOT NULL, 91 `latitude` decimal(17,14) NOT NULL default '0', 92 `longitude` decimal(17,14) NOT NULL default '0', 93 PRIMARY KEY (`requestId`,`imageId`) 94 )", 95 "CREATE TABLE `".$this->tables['cache_id']."` ( 96 `requestId` mediumint(8) UNSIGNED NOT NULL auto_increment, 89 97 `userId` smallint(5) NOT NULL, 90 `requestId` timestamp NOT NULL default '0000-00-00 00:00:00', 91 `imageId` mediumint(8) NOT NULL, 92 `latitude` decimal(20,17) NOT NULL default '0.00000000000000000', 93 `longitude` decimal(20,17) NOT NULL default '0.00000000000000000', 94 `imageName` varchar(255) NOT NULL, 95 `imageTnFile` varchar(255) NOT NULL, 96 `imageCatsId` varchar(255) NOT NULL, 97 `imageCatsNames` varchar(255) NOT NULL, 98 `imageCatsPLink` varchar(255) NOT NULL, 99 PRIMARY KEY USING BTREE (`userId`,`requestId`,`imageId`) 98 `date` timestamp NOT NULL default '0000-00-00 00:00:00', 99 PRIMARY KEY (`requestId`) 100 100 )", 101 101 "CREATE TABLE `".$this->tables['kmlfiles']."` ( … … 144 144 case '01.01.00': 145 145 $this->updateFrom_010100(); 146 case '01.02.00': 147 case '01.02.01': 148 case '01.02.02': 149 $this->updateFrom_010202(); 146 150 default: 147 151 // nothing to do... … … 218 222 } 219 223 224 /** 225 * update from release 1.2.2 226 * 227 */ 228 private function updateFrom_010202() 229 { 230 $sql="DROP TABLE ".$this->tables['cache']; 231 pwg_query($sql); 232 233 $tablesCreate=array( 234 "CREATE TABLE `".$this->tables['cache']."` ( 235 `requestId` int(8) UNSIGNED NOT NULL default '0', 236 `imageId` mediumint(8) NOT NULL, 237 `latitude` decimal(17,14) NOT NULL default '0', 238 `longitude` decimal(17,14) NOT NULL default '0', 239 PRIMARY KEY (`requestId`,`imageId`) 240 );", 241 "CREATE TABLE `".$this->tables['cache_id']."` ( 242 `requestId` mediumint(8) UNSIGNED NOT NULL auto_increment, 243 `userId` smallint(5) NOT NULL, 244 `date` NOT NULL default '0000-00-00 00:00:00', 245 PRIMARY KEY (`requestId`) 246 )" 247 ); 248 249 $tablesUpdate=array( 250 $this->tables['category_maps'] => array( 251 'forceDisplay' => " ADD COLUMN `forceDisplay` CHAR(1) NOT NULL DEFAULT 'n' AFTER `title` ", 252 ) 253 ); 254 255 $tablesDef = create_table_add_character_set($tablesCreate); 256 257 $tablef=new GPCTables(array($this->tables['cache'], $this->tables['cache_id'])); 258 $tablef->create($tablesCreate); 259 $tablef->updateTablesFields($tablesUpdate); 260 261 unset($tablesCreate); 262 unset($tablesUpdate); 263 } 220 264 221 265
Note: See TracChangeset
for help on using the changeset viewer.