When trying to install TeemIP (with IPv6), the setup produces the following SQL error:
MySQLException: Failed to issue SQL query: query = CREATE TABLE `ipconfig` (`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `org_id` INT(11) DEFAULT 0, INDEX (`org_id`), `name` VARCHAR(255) DEFAULT 'IP Settings', `requestor_id` INT(11) DEFAULT 0, INDEX (`requestor_id`), `ipv4_block_min_size` INT(11) DEFAULT 256, `ipv4_block_cidr_aligned` ENUM('bca_no','bca_yes') DEFAULT 'bca_yes', `reserve_subnet_IPs` ENUM('reserve_no','reserve_yes') DEFAULT 'reserve_no', `ipv4_gateway_ip_format` ENUM('broadcastip_minus_1','free_setup','subnetip_plus_1') DEFAULT 'subnetip_plus_1', `subnet_low_watermark` INT(11) DEFAULT 60, `subnet_high_watermark` INT(11) DEFAULT 80, `iprange_low_watermark` INT(11) DEFAULT 60, `iprange_high_watermark` INT(11) DEFAULT 80, `ip_allow_duplicate_name` ENUM('ipdup_no','ipdup_yes') DEFAULT 'ipdup_no', `mac_address_format` ENUM('colons','dots','hyphens') DEFAULT 'colons', `ping_before_assign` ENUM('ping_no','ping_yes') DEFAULT 'ping_no', `ipv6_block_min_prefix` ENUM('48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64') DEFAULT 64, `ipv6_block_cidr_aligned` ENUM('bca_no','bca_yes') DEFAULT 'bca_yes', `ipv6_gateway_ip_format` ENUM('free_setup','lastip','subnetip_plus_1') DEFAULT 'subnetip_plus_1') ENGINE = innodb CHARACTER SET utf8 COLLATE utf8_unicode_ci, mysql_error = Invalid default value for 'ipv6_block_min_prefix', mysql_errno = 1067
Note that if you change the default value from 64 (as a number) to '64' (as a string), then it works.
Fix committed as [r3668]
Related
Commit: <Commit _id='5358055aa02bb175d1406271:3668' tree_id='8aa0b5ddb9d8c10432fdc3890124689f043c388d' committed=I{'date': datetime.datetime(2015, 8, 3, 15, 33, 37, 448000), 'email': '', 'name': 'dflaven'} authored=I{'date': datetime.datetime(2015, 8, 3, 15, 33, 37, 448000), 'email': '', 'name': 'dflaven'} message='#1116 (and #1117): default values for ENUMs must always be expressed as strings.' parent_ids=I['5358055aa02bb175d1406271:3667'] child_ids=I['5358055aa02bb175d1406271:3669'] repo_ids=I[ObjectId('5358055aa02bb175d1406271')]>