little bug in scalr.sql in scalr3.5

97 views
Skip to first unread message

francesco cislaghi

unread,
Jun 20, 2012, 7:08:53 AM6/20/12
to scalr-...@googlegroups.com
Hi all,

i think there's a bug in the creation of a table in the scalr.sql file released with 3.5 

Here's what i get

[root@ip-10-234-222-4 etc]# cat /var/www/html/sql/scalr.sql | mysql -uscalr -p scalr
Enter password:
ERROR 1054 (42S22) at line 2222: Unknown column 'architecture' in 'field list'

I've fixed it by adding the missing columns in the table creation statement. Here's a vimdiff between the released copy and the changes i've made:

-
  CREATE TABLE IF NOT EXISTS `role_images` (                        |  CREATE TABLE IF NOT EXISTS `role_images` (
    `id` int(11) NOT NULL AUTO_INCREMENT,                           |    `id` int(11) NOT NULL AUTO_INCREMENT,
    `role_id` int(11) NOT NULL,                                     |    `role_id` int(11) NOT NULL,
    `cloud_location` varchar(25) DEFAULT NULL,                      |    `cloud_location` varchar(25) DEFAULT NULL,
    `image_id` varchar(255) DEFAULT NULL,                           |    `image_id` varchar(255) DEFAULT NULL,
    `platform` varchar(25) DEFAULT NULL,                            |    `platform` varchar(25) DEFAULT NULL,
    `architecture` varchar(25) DEFAULT NULL,                        |  -----------------------------------------------------------------------
    `os_family` varchar(25) DEFAULT NULL,                           |  -----------------------------------------------------------------------
    `os_name` varchar(25) DEFAULT NULL,                             |  -----------------------------------------------------------------------
    `os_version` varchar(25) DEFAULT NULL,                          |  -----------------------------------------------------------------------
    `agent_version` varchar(25) DEFAULT NULL,                       |  -----------------------------------------------------------------------
    PRIMARY KEY (`id`),                                             |    PRIMARY KEY (`id`),
    UNIQUE KEY `unique` (`role_id`,`image_id`,`cloud_location`),    |    UNIQUE KEY `unique` (`role_id`,`image_id`,`cloud_location`),
    UNIQUE KEY `role_id_location` (`role_id`,`cloud_location`),     |    UNIQUE KEY `role_id_location` (`role_id`,`cloud_location`),
    KEY `NewIndex1` (`platform`),                                   |    KEY `NewIndex1` (`platform`),
    KEY `location` (`cloud_location`)                               |    KEY `location` (`cloud_location`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 

I hope this helps
Cheers 

Reply all
Reply to author
Forward
0 new messages