r5094 Add support for locations. Upgrading from 0.19.x works as-is. Upgrading from...
authorAaron Dummer <aaron@dummer.info>
Sun, 3 Jun 2012 23:39:55 +0000 (23:39 +0000)
committerAaron Dummer <aaron@dummer.info>
Sun, 3 Jun 2012 23:39:55 +0000 (23:39 +0000)
commite1add254a7649171ca857436bda503c27d61ef7d
treed0d9c087a6d3232ee0d4cd3c565d25c52a041f4e
parent4d0823723b39e712a71e80088565a0c696c13f1b
r5094 Add support for locations.  Upgrading from 0.19.x works as-is.  Upgrading from a previous revision of 0.20.0 requires some manual modification of the schema and data.

ALTER TABLE `EntityLink` MODIFY COLUMN `parent_entity_type` ENUM('ipv4net','ipv4rspool','ipv4vs','ipv6net','location','object','rack','row','user') NOT NULL;
ALTER TABLE `EntityLink` MODIFY COLUMN `child_entity_type` ENUM('file','location','object','rack','row') NOT NULL;
ALTER TABLE `FileLink` MODIFY COLUMN `entity_type` ENUM('ipv4net','ipv4rspool','ipv4vs','ipv6net','location','object','rack','user') NOT NULL DEFAULT 'object';
UPDATE `Object` SET name=label, label=NULL WHERE objtype_id = 1561;
UPDATE `EntityLink` SET parent_entity_type = 'row', child_entity_type = 'rack' WHERE child_entity_type = 'object' AND child_entity_id IN (SELECT id FROM `Object` WHERE objtype_id = 1560);

Also, create the Locations view and drop/re-create the Row and Rack views as their definitions have changed.
ChangeLog
scripts/init-sample-racks.sql
wwwroot/inc/ajax-interface.php
wwwroot/inc/database.php
wwwroot/inc/functions.php
wwwroot/inc/init.php
wwwroot/inc/install.php
wwwroot/inc/interface.php
wwwroot/inc/navigation.php
wwwroot/inc/ophandlers.php
wwwroot/inc/upgrade.php