View Issue Details

IDProjectCategoryView StatusLast Update
961RackTablesdefaultpublic2013-10-18 17:16
Reportershyamrkg Assigned Toinfrastation  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Version0.19.10 
Summary961: Trying to update getting below error
DescriptionHi,

I am trying to upgrade mine OLD version from 0.10.10 TO 0.20.5 ,but getting below

mention error :

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'racktables.RackObject' doesn't exist (42S02)
at file /var/www/html/racktables/wwwroot/inc/upgrade.php, line 1411

/var/www/html/racktables/wwwroot/inc/upgrade.php:1411 query('ALTER TABLE `RackObject` RENAME TO `Object`')
/var/www/html/racktables/wwwroot/inc/upgrade.php:1665 getUpgradeBatch('0.20.0')
/var/www/html/racktables/wwwroot/inc/upgrade.php:1850 executeUpgradeBatch('0.20.0')
/var/www/html/racktables/wwwroot/index.php:257 renderUpgraderHTML()
Error info:

Array
(
    [0] => 42S02
    [1] => 1146
    [2] => Table 'racktables.RackObject' doesn't exist

Thanks in Advance
TagsNo tags attached.

Relationships

related to 1037 closed Update from 0.19.14 to 0.20.0 

Activities

infrastation

infrastation

2013-07-25 10:15

administrator   ~0001629

Version 0.10.10 was never released, could you check?
shyamrkg

shyamrkg

2013-07-25 10:23

reporter   ~0001631

Last edited: 2013-07-25 10:25

Hi,

Sorry for typo mistake

Racktables version is 0.19.10 pls check .

 

thanks

infrastation

infrastation

2013-07-25 10:28

administrator   ~0001633

Could you restore from backup and post the output of the following SQL command?

SHOW TABLES LIKE '%Object%';
shyamrkg

shyamrkg

2013-07-25 10:38

reporter   ~0001635

Hi ,

Here is the O/P

mysql> SHOW TABLES LIKE '%Object%';
+------------------------------------+
| Tables_in_racktables_db (%Object%) |
+------------------------------------+
| Object |
| ObjectHistory |
| ObjectLog |
| ObjectParentCompat |
+------------------------------------+
4 rows in set (0.00 sec)


Thanks
infrastation

infrastation

2013-07-25 10:57

administrator   ~0001637

In 0.19.10 the table is called "RackObject" and the source code expects exactly this table name. Is this the original 0.19.10 or a modified version?
shyamrkg

shyamrkg

2013-07-25 11:10

reporter   ~0001639

Hi,

 It seems to be then modified by earlier ADMIN ,

Is thr any option with me now to upgrade the same by renaming any table or modifying upgrade file
infrastation

infrastation

2013-07-25 11:18

administrator   ~0001641

It makes sense to ask the previous admin to map the changes he did, because late 0.19.x and early 0.20.x releases bring quite notable changes to database.
shyamrkg

shyamrkg

2013-07-25 11:24

reporter   ~0001643

Hi,

I really appreciate your prompt response ,but issue with me is that he already left the company and not being in touch .

So only option is to resolve other way only .
infrastation

infrastation

2013-07-25 11:41

administrator   ~0001645

It will take some time. Meanwhile it is better to leave this instance of RackTables not upgraded. Could you attach the output of "mysqldump --no-data racktables_database_name" to this issue?
shyamrkg

shyamrkg

2013-07-25 12:03

reporter   ~0001647

-- MySQL dump 10.13 Distrib 5.1.69, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: racktables_db
-- ------------------------------------------------------
-- Server version 5.1.69

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `Atom`
--

DROP TABLE IF EXISTS `Atom`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Atom` (
  `molecule_id` int(10) unsigned DEFAULT NULL,
  `rack_id` int(10) unsigned DEFAULT NULL,
  `unit_no` int(10) unsigned DEFAULT NULL,
  `atom` enum('front','interior','rear') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Attribute`
--

DROP TABLE IF EXISTS `Attribute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Attribute` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('string','uint','float','dict','date') DEFAULT NULL,
  `name` char(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttributeMap`
--

DROP TABLE IF EXISTS `AttributeMap`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttributeMap` (
  `objtype_id` int(10) unsigned NOT NULL DEFAULT '1',
  `attr_id` int(10) unsigned NOT NULL DEFAULT '1',
  `chapter_id` int(10) unsigned DEFAULT NULL,
  UNIQUE KEY `objtype_id` (`objtype_id`,`attr_id`),
  KEY `attr_id` (`attr_id`),
  KEY `chapter_id` (`chapter_id`),
  CONSTRAINT `AttributeMap?FK?attr_id` FOREIGN KEY (`attr_id`) REFERENCES `Attribute` (`id`),
  CONSTRAINT `AttributeMap?FK?chapter_id` FOREIGN KEY (`chapter_id`) REFERENCES `Chapter` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttributeValue`
--

DROP TABLE IF EXISTS `AttributeValue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttributeValue` (
  `object_id` int(10) unsigned NOT NULL,
  `object_tid` int(10) unsigned NOT NULL DEFAULT '0',
  `attr_id` int(10) unsigned NOT NULL,
  `string_value` char(255) DEFAULT NULL,
  `uint_value` int(10) unsigned DEFAULT NULL,
  `float_value` float DEFAULT NULL,
  PRIMARY KEY (`object_id`,`attr_id`),
  KEY `attr_id-uint_value` (`attr_id`,`uint_value`),
  KEY `attr_id-string_value` (`attr_id`,`string_value`(12)),
  KEY `id-tid` (`object_id`,`object_tid`),
  KEY `object_tid-attr_id` (`object_tid`,`attr_id`),
  CONSTRAINT `AttributeValue?FK?map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`),
  CONSTRAINT `AttributeValue?FK?object` FOREIGN KEY (`object_id`, `object_tid`) REFERENCES `Object` (`id`, `objtype_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `AttributeValue?FK?attr_id` FOREIGN KEY (`attr_id`) REFERENCES `AttributeMap` (`attr_id`),
  CONSTRAINT `AttributeValue?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CachedPAV`
--

DROP TABLE IF EXISTS `CachedPAV`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CachedPAV` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
  KEY `vlan_id` (`vlan_id`),
  CONSTRAINT `CachedPAV?FK?object?port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `CachedPVM` (`object_id`, `port_name`) ON DELETE CASCADE,
  CONSTRAINT `CachedPAV?FK?vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CachedPNV`
--

DROP TABLE IF EXISTS `CachedPNV`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CachedPNV` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
  UNIQUE KEY `port_id` (`object_id`,`port_name`),
  CONSTRAINT `CachedPNV?FK?compound` FOREIGN KEY (`object_id`, `port_name`, `vlan_id`) REFERENCES `CachedPAV` (`object_id`, `port_name`, `vlan_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CachedPVM`
--

DROP TABLE IF EXISTS `CachedPVM`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CachedPVM` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_mode` enum('access','trunk') NOT NULL DEFAULT 'access',
  PRIMARY KEY (`object_id`,`port_name`),
  CONSTRAINT `CachedPVM?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CactiGraph`
--

DROP TABLE IF EXISTS `CactiGraph`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CactiGraph` (
  `object_id` int(10) unsigned NOT NULL,
  `graph_id` int(10) unsigned NOT NULL,
  `caption` char(255) DEFAULT NULL,
  PRIMARY KEY (`graph_id`),
  KEY `object_id` (`object_id`),
  CONSTRAINT `CactiGraph?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Chapter`
--

DROP TABLE IF EXISTS `Chapter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Chapter` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sticky` enum('yes','no') DEFAULT 'no',
  `name` char(128) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Config`
--

DROP TABLE IF EXISTS `Config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Config` (
  `varname` char(32) NOT NULL,
  `varvalue` text NOT NULL,
  `vartype` enum('string','uint') NOT NULL DEFAULT 'string',
  `emptyok` enum('yes','no') NOT NULL DEFAULT 'no',
  `is_hidden` enum('yes','no') NOT NULL DEFAULT 'yes',
  `is_userdefined` enum('yes','no') NOT NULL DEFAULT 'no',
  `description` text,
  PRIMARY KEY (`varname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Dictionary`
--

DROP TABLE IF EXISTS `Dictionary`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Dictionary` (
  `chapter_id` int(10) unsigned NOT NULL,
  `dict_key` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dict_sticky` enum('yes','no') DEFAULT 'no',
  `dict_value` char(255) DEFAULT NULL,
  PRIMARY KEY (`dict_key`),
  UNIQUE KEY `dict_unique` (`chapter_id`,`dict_value`,`dict_sticky`),
  CONSTRAINT `Dictionary?FK?chapter_id` FOREIGN KEY (`chapter_id`) REFERENCES `Chapter` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50020 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityLink`
--

DROP TABLE IF EXISTS `EntityLink`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityLink` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipv6net','object','rack','user') NOT NULL,
  `parent_entity_id` int(10) unsigned NOT NULL,
  `child_entity_type` enum('file','object') NOT NULL,
  `child_entity_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `EntityLink-unique` (`parent_entity_type`,`parent_entity_id`,`child_entity_type`,`child_entity_id`),
  KEY `EntityLink-compound` (`parent_entity_type`,`child_entity_type`,`child_entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `File`
--

DROP TABLE IF EXISTS `File`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `File` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(255) NOT NULL,
  `type` char(255) NOT NULL,
  `size` int(10) unsigned NOT NULL,
  `ctime` datetime NOT NULL,
  `mtime` datetime NOT NULL,
  `atime` datetime NOT NULL,
  `thumbnail` longblob,
  `contents` longblob NOT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FileLink`
--

DROP TABLE IF EXISTS `FileLink`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FileLink` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `file_id` int(10) unsigned NOT NULL,
  `entity_type` enum('ipv4net','ipv4rspool','ipv4vs','object','rack','user','ipv6net') NOT NULL DEFAULT 'object',
  `entity_id` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `FileLink-unique` (`file_id`,`entity_type`,`entity_id`),
  KEY `FileLink-file_id` (`file_id`),
  CONSTRAINT `FileLink?File_fkey` FOREIGN KEY (`file_id`) REFERENCES `File` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4Address`
--

DROP TABLE IF EXISTS `IPv4Address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4Address` (
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `name` char(255) NOT NULL DEFAULT '',
  `reserved` enum('yes','no') DEFAULT NULL,
  PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4Allocation`
--

DROP TABLE IF EXISTS `IPv4Allocation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4Allocation` (
  `object_id` int(10) unsigned NOT NULL DEFAULT '0',
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `name` char(255) NOT NULL DEFAULT '',
  `type` enum('regular','shared','virtual','router') DEFAULT NULL,
  PRIMARY KEY (`object_id`,`ip`),
  KEY `ip` (`ip`),
  CONSTRAINT `IPv4Allocation?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4LB`
--

DROP TABLE IF EXISTS `IPv4LB`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4LB` (
  `object_id` int(10) unsigned DEFAULT NULL,
  `rspool_id` int(10) unsigned DEFAULT NULL,
  `vs_id` int(10) unsigned DEFAULT NULL,
  `prio` int(10) unsigned DEFAULT NULL,
  `vsconfig` text,
  `rsconfig` text,
  UNIQUE KEY `LB-VS` (`object_id`,`vs_id`),
  KEY `IPv4LB-FK-rspool_id` (`rspool_id`),
  KEY `IPv4LB-FK-vs_id` (`vs_id`),
  CONSTRAINT `IPv4LB?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`),
  CONSTRAINT `IPv4LB?FK?rspool_id` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`),
  CONSTRAINT `IPv4LB?FK?vs_id` FOREIGN KEY (`vs_id`) REFERENCES `IPv4VS_old` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4NAT`
--

DROP TABLE IF EXISTS `IPv4NAT`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4NAT` (
  `object_id` int(10) unsigned NOT NULL DEFAULT '0',
  `proto` enum('TCP','UDP') NOT NULL DEFAULT 'TCP',
  `localip` int(10) unsigned NOT NULL DEFAULT '0',
  `localport` smallint(5) unsigned NOT NULL DEFAULT '0',
  `remoteip` int(10) unsigned NOT NULL DEFAULT '0',
  `remoteport` smallint(5) unsigned NOT NULL DEFAULT '0',
  `description` char(255) DEFAULT NULL,
  PRIMARY KEY (`object_id`,`proto`,`localip`,`localport`,`remoteip`,`remoteport`),
  KEY `localip` (`localip`),
  KEY `remoteip` (`remoteip`),
  KEY `object_id` (`object_id`),
  CONSTRAINT `IPv4NAT?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4Network`
--

DROP TABLE IF EXISTS `IPv4Network`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4Network` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `mask` int(10) unsigned NOT NULL DEFAULT '0',
  `name` char(255) DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `base-len` (`ip`,`mask`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4RS`
--

DROP TABLE IF EXISTS `IPv4RS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4RS` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `inservice` enum('yes','no') NOT NULL DEFAULT 'no',
  `rsip` varbinary(16) NOT NULL,
  `rsport` smallint(5) unsigned DEFAULT NULL,
  `rspool_id` int(10) unsigned DEFAULT NULL,
  `rsconfig` text,
  `comment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`),
  KEY `rsip` (`rsip`),
  CONSTRAINT `IPRS?FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4RSPool`
--

DROP TABLE IF EXISTS `IPv4RSPool`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4RSPool` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(255) DEFAULT NULL,
  `vsconfig` text,
  `rsconfig` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4RS_old`
--

DROP TABLE IF EXISTS `IPv4RS_old`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4RS_old` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `inservice` enum('yes','no') NOT NULL DEFAULT 'no',
  `rsip` int(10) unsigned DEFAULT NULL,
  `rsport` smallint(5) unsigned DEFAULT NULL,
  `rspool_id` int(10) unsigned DEFAULT NULL,
  `rsconfig` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`),
  KEY `rsip` (`rsip`),
  CONSTRAINT `IPv4RS?FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4VS`
--

DROP TABLE IF EXISTS `IPv4VS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4VS` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `vip` varbinary(16) NOT NULL,
  `vport` smallint(5) unsigned DEFAULT NULL,
  `proto` enum('TCP','UDP','MARK') NOT NULL DEFAULT 'TCP',
  `name` char(255) DEFAULT NULL,
  `vsconfig` text,
  `rsconfig` text,
  PRIMARY KEY (`id`),
  KEY `vip` (`vip`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv4VS_old`
--

DROP TABLE IF EXISTS `IPv4VS_old`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv4VS_old` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `vip` int(10) unsigned DEFAULT NULL,
  `vport` smallint(5) unsigned DEFAULT NULL,
  `proto` enum('TCP','UDP') NOT NULL DEFAULT 'TCP',
  `name` char(255) DEFAULT NULL,
  `vsconfig` text,
  `rsconfig` text,
  PRIMARY KEY (`id`),
  KEY `vip` (`vip`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv6Address`
--

DROP TABLE IF EXISTS `IPv6Address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv6Address` (
  `ip` binary(16) NOT NULL,
  `name` char(255) NOT NULL DEFAULT '',
  `reserved` enum('yes','no') DEFAULT NULL,
  PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv6Allocation`
--

DROP TABLE IF EXISTS `IPv6Allocation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv6Allocation` (
  `object_id` int(10) unsigned NOT NULL DEFAULT '0',
  `ip` binary(16) NOT NULL,
  `name` char(255) NOT NULL DEFAULT '',
  `type` enum('regular','shared','virtual','router') DEFAULT NULL,
  PRIMARY KEY (`object_id`,`ip`),
  KEY `ip` (`ip`),
  CONSTRAINT `IPv6Allocation?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `IPv6Network`
--

DROP TABLE IF EXISTS `IPv6Network`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IPv6Network` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ip` binary(16) NOT NULL,
  `mask` int(10) unsigned NOT NULL,
  `last_ip` binary(16) NOT NULL,
  `name` char(255) DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ip` (`ip`,`mask`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `LDAPCache`
--

DROP TABLE IF EXISTS `LDAPCache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LDAPCache` (
  `presented_username` char(64) NOT NULL,
  `successful_hash` char(40) NOT NULL,
  `first_success` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_retry` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `displayed_name` char(128) DEFAULT NULL,
  `memberof` text,
  UNIQUE KEY `presented_username` (`presented_username`),
  KEY `scanidx` (`presented_username`,`successful_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Link`
--

DROP TABLE IF EXISTS `Link`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Link` (
  `porta` int(10) unsigned NOT NULL DEFAULT '0',
  `portb` int(10) unsigned NOT NULL DEFAULT '0',
  `cable` char(64) DEFAULT NULL,
  PRIMARY KEY (`porta`,`portb`),
  UNIQUE KEY `porta` (`porta`),
  UNIQUE KEY `portb` (`portb`),
  CONSTRAINT `Link?FK?a` FOREIGN KEY (`porta`) REFERENCES `Port` (`id`) ON DELETE CASCADE,
  CONSTRAINT `Link?FK?b` FOREIGN KEY (`portb`) REFERENCES `Port` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Molecule`
--

DROP TABLE IF EXISTS `Molecule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Molecule` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MountOperation`
--

DROP TABLE IF EXISTS `MountOperation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MountOperation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `object_id` int(10) unsigned NOT NULL DEFAULT '0',
  `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `user_name` char(64) DEFAULT NULL,
  `old_molecule_id` int(10) unsigned DEFAULT NULL,
  `new_molecule_id` int(10) unsigned DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  KEY `object_id` (`object_id`),
  CONSTRAINT `MountOperation?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=485 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Object`
--

DROP TABLE IF EXISTS `Object`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Object` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(255) DEFAULT NULL,
  `label` char(255) DEFAULT NULL,
  `objtype_id` int(10) unsigned NOT NULL DEFAULT '1',
  `asset_no` char(64) DEFAULT NULL,
  `has_problems` enum('yes','no') NOT NULL DEFAULT 'no',
  `comment` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `RackObject_asset_no` (`asset_no`),
  KEY `id-tid` (`id`,`objtype_id`)
) ENGINE=InnoDB AUTO_INCREMENT=555 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ObjectHistory`
--

DROP TABLE IF EXISTS `ObjectHistory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ObjectHistory` (
  `id` int(10) unsigned DEFAULT NULL,
  `name` char(255) DEFAULT NULL,
  `label` char(255) DEFAULT NULL,
  `objtype_id` int(10) unsigned DEFAULT NULL,
  `asset_no` char(64) DEFAULT NULL,
  `has_problems` enum('yes','no') NOT NULL DEFAULT 'no',
  `comment` text,
  `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `user_name` char(64) DEFAULT NULL,
  KEY `id` (`id`),
  CONSTRAINT `RackObjectHistory?FK?object_id` FOREIGN KEY (`id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ObjectLog`
--

DROP TABLE IF EXISTS `ObjectLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ObjectLog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `object_id` int(10) unsigned NOT NULL,
  `user` char(64) NOT NULL,
  `date` datetime NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `object_id` (`object_id`),
  KEY `date` (`date`),
  CONSTRAINT `ObjectLog?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ObjectParentCompat`
--

DROP TABLE IF EXISTS `ObjectParentCompat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ObjectParentCompat` (
  `parent_objtype_id` int(10) unsigned NOT NULL,
  `child_objtype_id` int(10) unsigned NOT NULL,
  UNIQUE KEY `parent_child` (`parent_objtype_id`,`child_objtype_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Port`
--

DROP TABLE IF EXISTS `Port`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Port` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `object_id` int(10) unsigned NOT NULL DEFAULT '0',
  `name` char(255) NOT NULL DEFAULT '',
  `iif_id` int(10) unsigned NOT NULL,
  `type` int(10) unsigned NOT NULL DEFAULT '0',
  `l2address` char(64) DEFAULT NULL,
  `reservation_comment` char(255) DEFAULT NULL,
  `label` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `object_iif_oif_name` (`object_id`,`iif_id`,`type`,`name`),
  KEY `type` (`type`),
  KEY `comment` (`reservation_comment`),
  KEY `l2address` (`l2address`),
  KEY `Port-FK-iif-oif` (`iif_id`,`type`),
  CONSTRAINT `Port?FK?iif?oif` FOREIGN KEY (`iif_id`, `type`) REFERENCES `PortInterfaceCompat` (`iif_id`, `oif_id`),
  CONSTRAINT `Port?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=708 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortAllowedVLAN`
--

DROP TABLE IF EXISTS `PortAllowedVLAN`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortAllowedVLAN` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
  KEY `vlan_id` (`vlan_id`),
  CONSTRAINT `PortAllowedVLAN?FK?object?port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `PortVLANMode` (`object_id`, `port_name`) ON DELETE CASCADE,
  CONSTRAINT `PortAllowedVLAN?FK?vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortCompat`
--

DROP TABLE IF EXISTS `PortCompat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortCompat` (
  `type1` int(10) unsigned NOT NULL DEFAULT '0',
  `type2` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `type1_2` (`type1`,`type2`),
  KEY `type2` (`type2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortInnerInterface`
--

DROP TABLE IF EXISTS `PortInnerInterface`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortInnerInterface` (
  `id` int(10) unsigned NOT NULL,
  `iif_name` char(16) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `iif_name` (`iif_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortInterfaceCompat`
--

DROP TABLE IF EXISTS `PortInterfaceCompat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortInterfaceCompat` (
  `iif_id` int(10) unsigned NOT NULL,
  `oif_id` int(10) unsigned NOT NULL,
  UNIQUE KEY `pair` (`iif_id`,`oif_id`),
  CONSTRAINT `PortInterfaceCompat?FK?iif_id` FOREIGN KEY (`iif_id`) REFERENCES `PortInnerInterface` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortNativeVLAN`
--

DROP TABLE IF EXISTS `PortNativeVLAN`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortNativeVLAN` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
  UNIQUE KEY `port_id` (`object_id`,`port_name`),
  CONSTRAINT `PortNativeVLAN?FK?compound` FOREIGN KEY (`object_id`, `port_name`, `vlan_id`) REFERENCES `PortAllowedVLAN` (`object_id`, `port_name`, `vlan_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PortVLANMode`
--

DROP TABLE IF EXISTS `PortVLANMode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PortVLANMode` (
  `object_id` int(10) unsigned NOT NULL,
  `port_name` char(255) NOT NULL,
  `vlan_mode` enum('access','trunk') NOT NULL DEFAULT 'access',
  PRIMARY KEY (`object_id`,`port_name`),
  CONSTRAINT `PortVLANMode?FK?object?port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `CachedPVM` (`object_id`, `port_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Rack`
--

DROP TABLE IF EXISTS `Rack`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Rack` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(255) DEFAULT NULL,
  `row_id` int(10) unsigned NOT NULL DEFAULT '1',
  `height` tinyint(3) unsigned NOT NULL DEFAULT '42',
  `comment` text,
  `thumb_data` blob,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_in_row` (`row_id`,`name`),
  CONSTRAINT `Rack?FK?row_id` FOREIGN KEY (`row_id`) REFERENCES `RackRow` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RackHistory`
--

DROP TABLE IF EXISTS `RackHistory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RackHistory` (
  `id` int(10) unsigned DEFAULT NULL,
  `name` char(255) DEFAULT NULL,
  `row_id` int(10) unsigned DEFAULT NULL,
  `height` tinyint(3) unsigned DEFAULT NULL,
  `comment` text,
  `thumb_data` blob,
  `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `user_name` char(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RackRow`
--

DROP TABLE IF EXISTS `RackRow`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RackRow` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RackSpace`
--

DROP TABLE IF EXISTS `RackSpace`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RackSpace` (
  `rack_id` int(10) unsigned NOT NULL DEFAULT '0',
  `unit_no` int(10) unsigned NOT NULL DEFAULT '0',
  `atom` enum('front','interior','rear') NOT NULL DEFAULT 'interior',
  `state` enum('A','U','T','W') NOT NULL DEFAULT 'A',
  `object_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`rack_id`,`unit_no`,`atom`),
  KEY `RackSpace_object_id` (`object_id`),
  CONSTRAINT `RackSpace?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE,
  CONSTRAINT `RackSpace?FK?rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Rack` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Script`
--

DROP TABLE IF EXISTS `Script`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Script` (
  `script_name` char(64) NOT NULL,
  `script_text` longtext,
  PRIMARY KEY (`script_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TagStorage`
--

DROP TABLE IF EXISTS `TagStorage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TagStorage` (
  `entity_realm` enum('file','ipv4net','ipv4vs','ipv4rspool','object','rack','user','ipv6net') NOT NULL DEFAULT 'object',
  `entity_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `entity_tag` (`entity_realm`,`entity_id`,`tag_id`),
  KEY `entity_id` (`entity_id`),
  KEY `TagStorage-FK-tag_id` (`tag_id`),
  CONSTRAINT `TagStorage?FK?tag_id` FOREIGN KEY (`tag_id`) REFERENCES `TagTree` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TagTree`
--

DROP TABLE IF EXISTS `TagTree`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TagTree` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) unsigned DEFAULT NULL,
  `tag` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tag` (`tag`),
  KEY `TagTree-K-parent_id` (`parent_id`),
  CONSTRAINT `TagTree?K?parent_id` FOREIGN KEY (`parent_id`) REFERENCES `TagTree` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserAccount`
--

DROP TABLE IF EXISTS `UserAccount`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserAccount` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_name` char(64) NOT NULL DEFAULT '',
  `user_password_hash` char(40) DEFAULT NULL,
  `user_realname` char(64) DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `user_name` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=10017 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserConfig`
--

DROP TABLE IF EXISTS `UserConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserConfig` (
  `varname` char(32) NOT NULL,
  `varvalue` text NOT NULL,
  `user` char(64) NOT NULL,
  UNIQUE KEY `user_varname` (`user`,`varname`),
  KEY `varname` (`varname`),
  CONSTRAINT `UserConfig?FK?user` FOREIGN KEY (`user`) REFERENCES `UserAccount` (`user_name`) ON DELETE CASCADE,
  CONSTRAINT `UserConfig?FK?varname` FOREIGN KEY (`varname`) REFERENCES `Config` (`varname`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANDescription`
--

DROP TABLE IF EXISTS `VLANDescription`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANDescription` (
  `domain_id` int(10) unsigned NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '0',
  `vlan_type` enum('ondemand','compulsory','alien') NOT NULL DEFAULT 'ondemand',
  `vlan_descr` char(255) DEFAULT NULL,
  PRIMARY KEY (`domain_id`,`vlan_id`),
  KEY `vlan_id` (`vlan_id`),
  CONSTRAINT `VLANDescription?FK?domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`) ON DELETE CASCADE,
  CONSTRAINT `VLANDescription?FK?vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANDomain`
--

DROP TABLE IF EXISTS `VLANDomain`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANDomain` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `description` (`description`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANIPv4`
--

DROP TABLE IF EXISTS `VLANIPv4`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANIPv4` (
  `domain_id` int(10) unsigned NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL,
  `ipv4net_id` int(10) unsigned NOT NULL,
  UNIQUE KEY `network-domain` (`ipv4net_id`,`domain_id`),
  KEY `VLANIPv4-FK-compound` (`domain_id`,`vlan_id`),
  CONSTRAINT `VLANIPv4?FK?compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE,
  CONSTRAINT `VLANIPv4?FK?ipv4net_id` FOREIGN KEY (`ipv4net_id`) REFERENCES `IPv4Network` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANIPv6`
--

DROP TABLE IF EXISTS `VLANIPv6`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANIPv6` (
  `domain_id` int(10) unsigned NOT NULL,
  `vlan_id` int(10) unsigned NOT NULL,
  `ipv6net_id` int(10) unsigned NOT NULL,
  UNIQUE KEY `network-domain` (`ipv6net_id`,`domain_id`),
  KEY `VLANIPv6-FK-compound` (`domain_id`,`vlan_id`),
  CONSTRAINT `VLANIPv6?FK?compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE,
  CONSTRAINT `VLANIPv6?FK?ipv6net_id` FOREIGN KEY (`ipv6net_id`) REFERENCES `IPv6Network` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANSTRule`
--

DROP TABLE IF EXISTS `VLANSTRule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANSTRule` (
  `vst_id` int(10) unsigned NOT NULL,
  `rule_no` int(10) unsigned NOT NULL,
  `port_pcre` char(255) NOT NULL,
  `port_role` enum('access','trunk','anymode','uplink','downlink','none') NOT NULL DEFAULT 'none',
  `wrt_vlans` char(255) DEFAULT NULL,
  `description` char(255) DEFAULT NULL,
  UNIQUE KEY `vst-rule` (`vst_id`,`rule_no`),
  CONSTRAINT `VLANSTRule?FK?vst_id` FOREIGN KEY (`vst_id`) REFERENCES `VLANSwitchTemplate` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANSwitch`
--

DROP TABLE IF EXISTS `VLANSwitch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANSwitch` (
  `object_id` int(10) unsigned NOT NULL,
  `domain_id` int(10) unsigned NOT NULL,
  `template_id` int(10) unsigned NOT NULL,
  `mutex_rev` int(10) unsigned NOT NULL DEFAULT '0',
  `out_of_sync` enum('yes','no') NOT NULL DEFAULT 'yes',
  `last_errno` int(10) unsigned NOT NULL DEFAULT '0',
  `last_change` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_push_started` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_push_finished` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_error_ts` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  UNIQUE KEY `object_id` (`object_id`),
  KEY `domain_id` (`domain_id`),
  KEY `template_id` (`template_id`),
  KEY `out_of_sync` (`out_of_sync`),
  KEY `last_errno` (`last_errno`),
  CONSTRAINT `VLANSwitch?FK?domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`),
  CONSTRAINT `VLANSwitch?FK?object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`),
  CONSTRAINT `VLANSwitch?FK?template_id` FOREIGN KEY (`template_id`) REFERENCES `VLANSwitchTemplate` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANSwitchTemplate`
--

DROP TABLE IF EXISTS `VLANSwitchTemplate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANSwitchTemplate` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mutex_rev` int(10) NOT NULL,
  `description` char(255) DEFAULT NULL,
  `saved_by` char(64) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `description` (`description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VLANValidID`
--

DROP TABLE IF EXISTS `VLANValidID`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VLANValidID` (
  `vlan_id` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-07-25 15:17:36
infrastation

infrastation

2013-07-25 12:12

administrator   ~0001649

Thank you. Let me have at least a week to examine this.
shyamrkg

shyamrkg

2013-07-25 12:15

reporter   ~0001651

Really gr8 thanks for your help and answer atleast some chance still with me ..will wait for your reply ..
shyamrkg

shyamrkg

2013-08-02 12:33

reporter   ~0001689

Hi ,

Any update on this

Thanks
infrastation

infrastation

2013-08-02 13:06

administrator   ~0001691

Not yet, excuse me. I'm closing some work before leaving for a vacation.
shyamrkg

shyamrkg

2013-08-13 10:59

reporter   ~0001713

Hi Infra,

Kindly update if you got any solution on this ..
shyamrkg

shyamrkg

2013-08-22 18:51

reporter   ~0001717

Hi Team ,

Kindly update me on this to resolve mine issue
infrastation

infrastation

2013-08-26 12:11

administrator   ~0001721

I will update this week. Thank you for patience.
shyamrkg

shyamrkg

2013-08-26 12:24

reporter   ~0001723

Thanks waiting for ur reply ..
infrastation

infrastation

2013-08-29 16:39

administrator   ~0001731

Regarding the RackObject table, the difference between the original 0.19.10 source code and the provided dump is:

--- RackObject-0.19.10.sql 2013-08-29 18:25:21.366077022 +0400
+++ RackObject-bug961.sql 2013-08-29 18:27:08.341202348 +0400
@@ -1,4 +1,4 @@
-CREATE TABLE `RackObject` (
+CREATE TABLE `Object` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `name` char(255) DEFAULT NULL,
   `label` char(255) DEFAULT NULL,
@@ -8,7 +8,7 @@
   `comment` text,
   PRIMARY KEY (`id`),
   UNIQUE KEY `RackObject_asset_no` (`asset_no`),
- UNIQUE KEY `name` (`name`)
+ KEY `id-tid` (`id`,`objtype_id`)
 ) ENGINE=InnoDB;

These changes can be attributed to the following code block (note that in the dump there is a table ObjectHistory, not RackObjectHistory):

            $dbxlink->query ('ALTER TABLE `RackObject` RENAME TO `Object`');
            $dbxlink->query ('ALTER TABLE `RackObjectHistory` RENAME TO `ObjectHistory`');
            $dbxlink->query ('ALTER TABLE `Object` DROP KEY `name`');

This code block now belongs to the 0.20.0 upgrade batch. Does the "0.19.10" version of this RackTables instance work now, i.e. displays object details in a normal way?
shyamrkg

shyamrkg

2013-09-10 15:12

reporter   ~0001745

Hi Infra ,

Thanks for your reply ,yes mine "0.19.10" version of this RackTables instance working .

As per your comment "This code block now belongs to the 0.20.0 upgrade batch"

do you mean I have to first upgrade to 0.20.0 then to 0.20.5 .

If not then where should I make this changes

$dbxlink->query ('ALTER TABLE `RackObject` RENAME TO `Object`');
$dbxlink->query ('ALTER TABLE `RackObjectHistory` RENAME TO `ObjectHistory`');
$dbxlink->query ('ALTER TABLE `Object` DROP KEY `name`');
infrastation

infrastation

2013-09-10 15:28

administrator   ~0001747

Hello.

This installation is not quite 0.19.10, it is clear now that it is a modified version that contains at least the changes from the development branch. Please don't make further changes to it. I will try to prepare the commands to fix it.
infrastation

infrastation

2013-09-19 19:11

administrator   ~0001771

A comparison of the SQL dump above with the 0.19.10 SQL dump reveals the following meaningful changes:

@@ -39,7 +39,7 @@
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `Attribute` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `type` enum('string','uint','float','dict') DEFAULT NULL,
+ `type` enum('string','uint','float','dict','date') DEFAULT NULL,
   `name` char(64) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `name` (`name`)

@@ -73,16 +73,21 @@
 /*!40101 SET @saved_cs_client = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `AttributeValue` (
- `object_id` int(10) unsigned DEFAULT NULL,
- `attr_id` int(10) unsigned DEFAULT NULL,
+ `object_id` int(10) unsigned NOT NULL,
+ `object_tid` int(10) unsigned NOT NULL DEFAULT '0',
+ `attr_id` int(10) unsigned NOT NULL,
   `string_value` char(255) DEFAULT NULL,
   `uint_value` int(10) unsigned DEFAULT NULL,
   `float_value` float DEFAULT NULL,
- UNIQUE KEY `object_id` (`object_id`,`attr_id`),
+ PRIMARY KEY (`object_id`,`attr_id`),
   KEY `attr_id-uint_value` (`attr_id`,`uint_value`),
   KEY `attr_id-string_value` (`attr_id`,`string_value`(12)),
+ KEY `id-tid` (`object_id`,`object_tid`),
+ KEY `object_tid-attr_id` (`object_tid`,`attr_id`),
+ CONSTRAINT `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`),
+ CONSTRAINT `AttributeValue-FK-object` FOREIGN KEY (`object_id`, `object_tid`) REFERENCES `Object` (`id`, `objtype_id`) ON DELETE CASCADE ON UPDATE CASCADE,

@@ -199,9 +204,10 @@
 CREATE TABLE `Dictionary` (
   `chapter_id` int(10) unsigned NOT NULL,
   `dict_key` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `dict_sticky` enum('yes','no') DEFAULT 'no',
   `dict_value` char(255) DEFAULT NULL,
   PRIMARY KEY (`dict_key`),
- UNIQUE KEY `chap_to_val` (`chapter_id`,`dict_value`),
+ UNIQUE KEY `dict_unique` (`chapter_id`,`dict_value`,`dict_sticky`),
   CONSTRAINT `Dictionary-FK-chapter_id` FOREIGN KEY (`chapter_id`) REFERENCES `Chapter` (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=50000 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;

@@ -220,6 +226,7 @@
   `child_entity_type` enum('file','object') NOT NULL,
   `child_entity_id` int(10) unsigned NOT NULL,
   PRIMARY KEY (`id`),
+ KEY `EntityLink-compound` (`parent_entity_type`,`child_entity_type`,`child_entity_id`),
   UNIQUE KEY `EntityLink-unique` (`parent_entity_type`,`parent_entity_id`,`child_entity_type`,`child_entity_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;

@@ -373,14 +380,15 @@
 CREATE TABLE `IPv4RS` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `inservice` enum('yes','no') NOT NULL DEFAULT 'no',
- `rsip` int(10) unsigned DEFAULT NULL,
+ `rsip` varbinary(16) NOT NULL,
   `rsport` smallint(5) unsigned DEFAULT NULL,
   `rspool_id` int(10) unsigned DEFAULT NULL,
   `rsconfig` text,
+ `comment` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`),
   KEY `rsip` (`rsip`),
- CONSTRAINT `IPv4RS-FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
+ CONSTRAINT `IPRS-FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
@@ -409,9 +417,9 @@
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `IPv4VS` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `vip` int(10) unsigned DEFAULT NULL,
+ `vip` varbinary(16) NOT NULL,
   `vport` smallint(5) unsigned DEFAULT NULL,
- `proto` enum('TCP','UDP') NOT NULL DEFAULT 'TCP',
+ `proto` enum('TCP','UDP','MARK') NOT NULL DEFAULT 'TCP',
   `name` char(255) DEFAULT NULL,
   `vsconfig` text,
   `rsconfig` text,

(RackObject)
@@ -757,18 +765,18 @@
   `comment` text,
   PRIMARY KEY (`id`),
   UNIQUE KEY `RackObject_asset_no` (`asset_no`),
- UNIQUE KEY `name` (`name`)
+ KEY `id-tid` (`id`,`objtype_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
infrastation

infrastation

2013-09-19 19:12

administrator   ~0001773

Would it be OK to discard the SLB data?
shyamrkg

shyamrkg

2013-09-23 18:26

reporter   ~0001783

Hi ,

I not understand SLB ,how it is implemented here .
shyamrkg

shyamrkg

2013-09-23 18:51

reporter   ~0001785

Hi ,

I just checked there is configuration in IPv4 SLB .

So is not possible to migrate with this data then surely I will discard it .

Kindly update the steps I have to follow

Thanks for your update
infrastation

infrastation

2013-09-24 23:22

administrator   ~0001789

Good to hear, then there are only the following changes in the way:

Attribute
AttributeValue
Dictionary
EntityLink
RackObject

I will try to prepare a query that reverts these premature changes and unblocks the regular upgrade. Thank you.
infrastation

infrastation

2013-10-03 15:53

administrator   ~0001799

Thank you for patience. Below is some SQL that should revert the changes prematurely applied to the database that get in the way of the upgrade process. Please execute these commands in the exact order on a copy of the current "0.19.10" RackTables database (make sure there is a working backup). If it gives any errors, don't proceed but post the errors here. If it runs OK proceed to upgrade to 0.20.5. If the upgrade gives any errors, post them here. Looking forward to know your results.

----------------------------------------------------------------------------
DROP TABLE IPv4RS_old;

DROP TABLE IPv4VS_old;

DROP TABLE IPv4RS;

DROP TABLE IPv4VS;

CREATE TABLE `IPv4RS` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `inservice` enum('yes','no') NOT NULL default 'no',
  `rsip` varbinary(16) NOT NULL,
  `rsport` smallint(5) unsigned default NULL,
  `rspool_id` int(10) unsigned default NULL,
  `rsconfig` text,
  `comment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `rsip` (`rsip`),
  UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`),
  CONSTRAINT `IPv4RS-FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;

CREATE TABLE `IPv4VS` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `vip` varbinary(16) NOT NULL,
  `vport` smallint(5) unsigned default NULL,
  `proto` enum('TCP','UDP','MARK') NOT NULL default 'TCP',
  `name` char(255) default NULL,
  `vsconfig` text,
  `rsconfig` text,
  PRIMARY KEY (`id`),
  KEY `vip` (`vip`)
) ENGINE=InnoDB;

ALTER TABLE EntityLink DROP KEY `EntityLink-compound`;

ALTER TABLE Dictionary ADD UNIQUE `chap_to_val` (chapter_id, dict_value);

ALTER TABLE Dictionary DROP KEY `dict_unique`;

ALTER TABLE Dictionary DROP COLUMN dict_sticky;

ALTER TABLE AttributeValue DROP FOREIGN KEY `AttributeValue-FK-map`;

ALTER TABLE AttributeValue DROP FOREIGN KEY `AttributeValue-FK-object`;

ALTER TABLE AttributeValue DROP KEY `id-tid`;

ALTER TABLE AttributeValue DROP KEY `object_tid-attr_id`;

ALTER TABLE AttributeValue DROP PRIMARY KEY;

ALTER TABLE AttributeValue ADD UNIQUE `object_id` (object_id, attr_id);

ALTER TABLE AttributeValue DROP COLUMN object_tid;

ALTER TABLE Object DROP KEY `id-tid`;

ALTER TABLE Object ADD UNIQUE (name);

ALTER TABLE Object RENAME TO RackObject;
shyamrkg

shyamrkg

2013-10-07 21:30

reporter   ~0001833

Last edited: 2013-10-07 21:32

Hi Infra,

Getting error while executing above commands of ALTER I stopped and mentioning below:

ALTER TABLE EntityLink DROP KEY `EntityLink-compound`;
ERROR 1091 (42000): Can't DROP 'EntityLink-compound'; check that column/key exists


ALTER TABLE Dictionary ADD UNIQUE `chap_to_val` (chapter_id, dict_value);
ERROR 1061 (42000): Duplicate key name 'chap_to_val'


ALTER TABLE Dictionary DROP KEY `dict_unique`;
ERROR 1091 (42000): Can't DROP 'dict_unique'; check that column/key exists


ALTER TABLE Dictionary DROP COLUMN dict_sticky;
ERROR 1091 (42000): Can't DROP 'dict_sticky'; check that column/key exists



ALTER TABLE AttributeValue DROP FOREIGN KEY `AttributeValue-FK-map`;
ERROR 1025 (HY000): Error on rename of './racktables_db/AttributeValue' to './racktables_db/#sql2-fdf-9' (errno: 152)

Kindly have a look thanks for your effort you doing

I got error running your ALTER command which I pasted above .

So I once again tried to follow the Racktables documentation to upgrade and surprisingly upgraded from 0.19.10 to 0.20.5 .

But now getting error pop up mentioning below when clicking "Object" tab on GUI Panel :

Internal error

Argument 'bypass' of value '(NULL)' is invalid.

When clicking on "RackSpace" Tab on gui panel it just blank page .

Other Tabs are working without any issue .So need your guide in this .

Thanks in Advance

infrastation

infrastation

2013-10-08 10:24

administrator   ~0001837

These errors mean that the database structure is different from the structure you have posted here on July 25. Either you tried the queries on some other database or the database is modified behind the scenes. Could you check thoroughly?
shyamrkg

shyamrkg

2013-10-08 13:45

reporter   ~0001839

Hi Infra ,

I got update form Team ,they just made some addition of object and Rackspace .


So database not being modified by anyone .

Gr8 thanks
infrastation

infrastation

2013-10-08 14:09

administrator   ~0001841

For example, the dump from July 25 contains:

CREATE TABLE `EntityLink` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipv6net','object','rack','user') NOT NULL,
  `parent_entity_id` int(10) unsigned NOT NULL,
  `child_entity_type` enum('file','object') NOT NULL,
  `child_entity_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `EntityLink-unique` (`parent_entity_type`,`parent_entity_id`,`child_entity_type`,`child_entity_id`),
  KEY `EntityLink-compound` (`parent_entity_type`,`child_entity_type`,`child_entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

With this table structure it is impossible to have this error:

mysql> CREATE TABLE `EntityLink` (
    -> `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    -> `parent_entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipv6net','object','rack','user') NOT NULL,
    -> `parent_entity_id` int(10) unsigned NOT NULL,
    -> `child_entity_type` enum('file','object') NOT NULL,
    -> `child_entity_id` int(10) unsigned NOT NULL,
    -> PRIMARY KEY (`id`),
    -> UNIQUE KEY `EntityLink-unique` (`parent_entity_type`,`parent_entity_id`,`child_entity_type`,`child_entity_id`),
    -> KEY `EntityLink-compound` (`parent_entity_type`,`child_entity_type`,`child_entity_id`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.01 sec)

mysql> ALTER TABLE EntityLink DROP KEY `EntityLink-compound`;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0

The real database structure is different from the one stated before.
shyamrkg

shyamrkg

2013-10-08 15:07

reporter   ~0001843

Ohh ,

But now I have this really not being modified but your above parameter right.It's really being time consuming for you and me ,can i get your help on this now
infrastation

infrastation

2013-10-08 15:35

administrator   ~0001845

Could you look for anybody with a good command of SQL and some spare time?
shyamrkg

shyamrkg

2013-10-08 15:38

reporter   ~0001847

Ok thanks for your effort and time
infrastation

infrastation

2013-10-08 17:08

administrator   ~0001849

I mean, if you want me to help any more, please bring into the issue someone who understands well what takes place in this database.
infrastation

infrastation

2013-10-09 11:01

administrator   ~0001851

Summary for future reviewers: this issue is not a RackTables bug. Closing for the time being.

Issue History

Date Modified Username Field Change
2013-07-24 20:08 shyamrkg New Issue
2013-07-25 10:15 infrastation Note Added: 0001629
2013-07-25 10:23 shyamrkg Note Added: 0001631
2013-07-25 10:25 shyamrkg Note Edited: 0001631
2013-07-25 10:28 infrastation Note Added: 0001633
2013-07-25 10:28 infrastation Assigned To => infrastation
2013-07-25 10:28 infrastation Status new => assigned
2013-07-25 10:38 shyamrkg Note Added: 0001635
2013-07-25 10:57 infrastation Note Added: 0001637
2013-07-25 11:10 shyamrkg Note Added: 0001639
2013-07-25 11:18 infrastation Note Added: 0001641
2013-07-25 11:24 shyamrkg Note Added: 0001643
2013-07-25 11:41 infrastation Note Added: 0001645
2013-07-25 12:03 shyamrkg Note Added: 0001647
2013-07-25 12:06 shyamrkg Note View State: 0001647: private
2013-07-25 12:07 shyamrkg Note View State: 0001647: public
2013-07-25 12:12 infrastation Note Added: 0001649
2013-07-25 12:15 shyamrkg Note Added: 0001651
2013-08-02 12:33 shyamrkg Note Added: 0001689
2013-08-02 13:06 infrastation Note Added: 0001691
2013-08-13 10:59 shyamrkg Note Added: 0001713
2013-08-22 18:51 shyamrkg Note Added: 0001717
2013-08-26 12:11 infrastation Note Added: 0001721
2013-08-26 12:24 shyamrkg Note Added: 0001723
2013-08-29 16:39 infrastation Note Added: 0001731
2013-09-07 21:11 infrastation Status assigned => feedback
2013-09-10 15:12 shyamrkg Note Added: 0001745
2013-09-10 15:12 shyamrkg Status feedback => assigned
2013-09-10 15:28 infrastation Note Added: 0001747
2013-09-19 19:11 infrastation Note Added: 0001771
2013-09-19 19:12 infrastation Note Added: 0001773
2013-09-23 18:26 shyamrkg Note Added: 0001783
2013-09-23 18:51 shyamrkg Note Added: 0001785
2013-09-24 23:22 infrastation Note Added: 0001789
2013-10-03 15:53 infrastation Note Added: 0001799
2013-10-07 21:30 shyamrkg Note Added: 0001833
2013-10-07 21:31 shyamrkg Note Edited: 0001833
2013-10-07 21:32 shyamrkg Note Edited: 0001833
2013-10-08 10:24 infrastation Note Added: 0001837
2013-10-08 13:45 shyamrkg Note Added: 0001839
2013-10-08 14:09 infrastation Note Added: 0001841
2013-10-08 15:07 shyamrkg Note Added: 0001843
2013-10-08 15:35 infrastation Note Added: 0001845
2013-10-08 15:38 shyamrkg Note Added: 0001847
2013-10-08 17:08 infrastation Note Added: 0001849
2013-10-09 11:01 infrastation Note Added: 0001851
2013-10-09 11:01 infrastation Status assigned => closed
2013-10-09 11:01 infrastation Resolution open => no change required
2013-10-18 17:16 adoom42 Relationship added related to 1037