mirror of https://github.com/apache/cloudstack.git
host_address in storage_pool should not have gotten the change to char(40)
This commit is contained in:
parent
cf6406695b
commit
49650f3eb6
|
|
@ -73,10 +73,9 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
|
|||
_upgradeMap.put("2.2.4", new DbUpgrade[] { new Upgrade224to225() });
|
||||
}
|
||||
|
||||
protected void runScript(File file) {
|
||||
protected void runScript(Connection conn, File file) {
|
||||
try {
|
||||
FileReader reader = new FileReader(file);
|
||||
Connection conn = Transaction.getStandaloneConnection();
|
||||
ScriptRunner runner = new ScriptRunner(conn, false, true);
|
||||
runner.runScript(reader);
|
||||
} catch (FileNotFoundException e) {
|
||||
|
|
@ -140,7 +139,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
|
|||
File[] scripts = upgrade.getPrepareScripts();
|
||||
if (scripts != null) {
|
||||
for (File script : scripts) {
|
||||
runScript(script);
|
||||
runScript(conn, script);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,11 +200,19 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
|
|||
+ upgrade.getUpgradableVersionRange()[1] + " to " + upgrade.getUpgradedVersion());
|
||||
|
||||
txn.start();
|
||||
|
||||
Connection conn;
|
||||
try {
|
||||
conn = txn.getConnection();
|
||||
} catch (SQLException e) {
|
||||
s_logger.error("Unable to cleanup the database", e);
|
||||
throw new CloudRuntimeException("Unable to cleanup the database", e);
|
||||
}
|
||||
|
||||
File[] scripts = upgrade.getCleanupScripts();
|
||||
if (scripts != null) {
|
||||
for (File script : scripts) {
|
||||
runScript(script);
|
||||
runScript(conn, script);
|
||||
s_logger.debug("Cleanup script " + script.getAbsolutePath() + " is executed successfully");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ ALTER TABLE `cloud`.`domain_router` MODIFY `guest_ip_address` char(40);
|
|||
ALTER TABLE `cloud`.`console_proxy` MODIFY `public_ip_address` char(40) UNIQUE;
|
||||
ALTER TABLE `cloud`.`secondary_storage_vm` MODIFY `public_ip_address` char(40) UNIQUE;
|
||||
ALTER TABLE `cloud`.`remote_access_vpn` MODIFY `local_ip` char(40) NOT NULL;
|
||||
ALTER TABLE `cloud`.`storage_pool` MODIFY `host_address` char(40) NOT NULL;
|
||||
ALTER TABLE `cloud`.`user_ip_address` MODIFY `public_ip_address` char(40) NOT NULL;
|
||||
|
||||
#Commented out these lines because they have to be done inside java.;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
--;
|
||||
|
||||
ALTER TABLE `cloud`.`security_group` add UNIQUE KEY (`name`, `account_id`);
|
||||
ALTER TABLE `cloud`.`storage_pool` MODIFY `host_address` varchar(255) NOT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `cloud`.`ovs_tunnel`(
|
||||
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
|
||||
|
|
|
|||
Loading…
Reference in New Issue