Database upgrade errors when upgrading from 1.3 to 1.4
phpipam open-source IP address management
Brought to you by:
myha
Thank you for your time.
When upgrading to version 1.4 from the file phpipam the database upgrade fails. First I get the following error. (ubuntu 16.04.1)
My php.ini file time out was set to 600 and upload_max_filesize, memory_limit and post_max_size were set to 30M, 128M and 40M.
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
Failed query:
CREATE TABLE `routing_bgp` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`local_as` int(12) unsigned NOT NULL,
`local_address` varchar(100) NOT NULL DEFAULT '',
`peer_name` varchar(255) NOT NULL DEFAULT '',
`peer_as` int(12) unsigned NOT NULL,
`peer_address` varchar(100) NOT NULL DEFAULT '',
`bgp_type` enum('internal','external') NOT NULL DEFAULT 'external',
`vrf_id` int(11) unsigned DEFAULT NULL,
`circuit_id` int(11) unsigned DEFAULT NULL,
`customer_id` int(11) unsigned DEFAULT NULL,
`description` text DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `vrf_id` (`vrf_id`),
KEY `circuit_id` (`circuit_id`),
KEY `cust_id` (`customer_id`),
CONSTRAINT `circuit_id` FOREIGN KEY (`circuit_id`) REFERENCES `circuits` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `cust_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `vrf_id` FOREIGN KEY (`vrf_id`) REFERENCES `vrf` (`vrfId`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
When I click the link to fix the issue, I am brought back to the upgrade page. Running the upgrade again I get a new error message.
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'id'; check that column/key exists
Failed query:
ALTER TABLE `users` DROP INDEX `id`;
Failed to upgrade database!
Have you seen this issue? Can I upgrade this install from github?
Thanks
Paul
Anonymous