Sebastian/Tim, DeployDB is broken on master due to commit
commit a8212d9ef458dd7ac64b021e6fa33fcf64b3cce0 Author: Tim Mackey <tmackey@gmail> Date: Thu Apr 10 15:57:24 2014 -0400 Cleanup of Xen and XenServer terms. Cloned xen plugin creating a xenserver plugin, then removed xen plugin Signed-off-by: Tim Mackey <tmac...@gmail.com> Signed-off-by: Sebastien Goasguen <run...@gmail.com> The part breaking the build caused by renaming the field “xen_network_label” to “xenserver_network_label”. The field is renamed twice – once in create-schema.sql: +++ b/setup/db/create-schema.sql @@ -2091,7 +2091,7 @@ CREATE TABLE `cloud`.`physical_network_traffic_types` ( - `xen_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host', + `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host', another attempt to modify is done in schema-440to450.sql file: +ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE `xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenSer Its incorrect way of doing things as create-schema.sql is executed as a 3.0 base when deploy the db, and then all upgrade scripts are executed on top. In 4.5 scenario both create-schema.sql and 44-45upgrade.sql scripts will be executed, and the last one will fail because the field was initially created with the right name. Why nobody observed the breakage? Because the line in 44-45.sql script the line you’ve added, is the last line and it wasn’t appended with “;”, therefore it was never executed :) Once you insert more update statements to the same script, the error will come up. To fix: * remove the update from create-schema.sql. * Append “;” to the last ALTER statement in “schema-440to450.sql" I’m going to fix it myself as a part of one of my commits. In the future: * all changes to the db should be done through the upgrade scripts for corresponding release (44-45.sql for 4.5 release, 45-46 for 4.6 release, etc), without touching the base (create-schema.sql), or modifying previous db upgrade scripts * Always append “;” to the end of mysql statement inserted to the .sql script otherwise the line won’t be executed Thank you, Alena.