Changeset 495


Ignore:
Timestamp:
Mar 1, 2013, 11:02:44 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Pozice subjektu na mapě se nyní zadává jako odkaz do tabulky MapPosition.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r494 r495  
    11<?php
    22
    3 $Revision = 494; // Subversion revision
    4 $DatabaseRevision = 494;
     3$Revision = 495; // Subversion revision
     4$DatabaseRevision = 495;
    55$ReleaseTime = '2013-03-01';
    66
  • trunk/admin/Updates.php

    r494 r495  
    1313}
    1414
    15 
     15function UpdateTo495($Manager)
     16{
     17  $Manager->Execute("INSERT INTO `MapPosition` (SELECT NULL AS `Id`, `Name`, `MapPositionX` AS `Latitude`, `MapPositionY` AS `Longitude` FROM `Subject`)");
     18  $Manager->Execute("ALTER TABLE `Subject` ADD `MapPosition` INT NULL AFTER `PayVAT`");
     19  $Manager->Execute("UPDATE `Subject` SET `MapPosition` = (SELECT `MapPosition`.`Id` FROM `MapPosition` WHERE `MapPosition`.`Name` = `Subject`.`Name` LIMIT 1)");
     20  $Manager->Execute("ALTER TABLE `Subject`  DROP `MapPositionX`,  DROP `MapPositionY`;");
     21  $Manager->Execute("ALTER TABLE `Subject` ADD INDEX ( `MapPosition` ) ");
     22  $Manager->Execute("ALTER TABLE `Subject` ADD FOREIGN KEY ( `MapPosition` ) REFERENCES `MapPosition` (".
     23    "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;");
     24}
    1625
    1726$Updates = array(
    1827        491 => array('Revision' => 493, 'Function' => 'UpdateTo493'),
    1928  493 => array('Revision' => 494, 'Function' => 'UpdateTo494'),
     29  494 => array('Revision' => 495, 'Function' => 'UpdateTo495'),
    2030);
    2131
  • trunk/form_classes.php

    r486 r495  
    397397      'IC' => array('Type' => 'String', 'Caption' => 'IČ', 'Default' => ''),
    398398      'DIC' => array('Type' => 'String', 'Caption' => 'DIČ', 'Default' => ''),
    399       'MapPositionX' => array('Type' => 'Float', 'Caption' => 'Pozice X', 'Default' => '0'),
    400       'MapPositionY' => array('Type' => 'Float', 'Caption' => 'Pozice Y', 'Default' => ''),
     399      'MapPosition' => array('Type' => 'TMapPosition', 'Caption' => 'Pozice na mapě', 'Default' => '', 'Null' => true),
    401400      'WWW' => array('Type' => 'Hyperlink', 'Caption' => 'WWW', 'Default' => ''),
    402401      'Note' => array('Type' => 'String', 'Caption' => 'Poznámka', 'Default' => ''),
Note: See TracChangeset for help on using the changeset viewer.