Changeset 891 for trunk/Modules/Map/Map.php
- Timestamp:
- Dec 30, 2020, 11:52:07 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r887 r891 316 316 function DoInstall(): void 317 317 { 318 $this->System->Database->query("CREATE TABLE IF NOT EXISTS `MapPosition` ( 319 `Id` int(11) NOT NULL AUTO_INCREMENT, 320 `Name` varchar(255) NOT NULL, 321 `Pos` varchar(255) NOT NULL, 322 PRIMARY KEY (`Id`) 323 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;"); 318 $this->InstallModel(MapPosition::GetDesc()); 324 319 } 325 320 326 321 function DoUninstall(): void 327 322 { 328 $this->Database->query('DROP TABLE `MapPosition`'); 329 } 330 } 323 $this->UninstallModel(MapPosition::GetDesc()); 324 } 325 } 326 327 class MapPosition extends Model 328 { 329 static function GetDesc(): ModelDesc 330 { 331 $Desc = new ModelDesc('MapPosition'); 332 $Desc->AddString('Name'); 333 $Desc->AddString('Pos'); 334 return $Desc; 335 } 336 }
Note:
See TracChangeset
for help on using the changeset viewer.