This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
     new 6502dde8c33 field enlarged and db upgrade (#8675)
6502dde8c33 is described below

commit 6502dde8c33feb43aad989c97960ba8efa3bfd34
Author: dahn <d...@onecht.net>
AuthorDate: Tue Apr 23 09:31:08 2024 +0200

    field enlarged and db upgrade (#8675)
    
    * 4.19 -> 4.19.1 and enlarge url field
---
 .../main/java/com/cloud/upgrade/dao/Upgrade41900to41910.java  | 11 ++++++-----
 .../src/main/resources/META-INF/db/schema-41900to41910.sql    |  4 ++++
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git 
a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41900to41910.java 
b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41900to41910.java
index 5c57fb31fcf..4cdd1c3364d 100644
--- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41900to41910.java
+++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41900to41910.java
@@ -16,9 +16,10 @@
 // under the License.
 package com.cloud.upgrade.dao;
 
+import org.apache.log4j.Logger;
+
 import com.cloud.upgrade.SystemVmTemplateRegistration;
 import com.cloud.utils.exception.CloudRuntimeException;
-import org.apache.log4j.Logger;
 
 import java.io.InputStream;
 import java.sql.Connection;
@@ -73,6 +74,10 @@ public class Upgrade41900to41910 implements DbUpgrade, 
DbUpgradeSystemVmTemplate
         DbUpgradeUtils.addIndexIfNeeded(conn, "vm_stats", "vm_id");
     }
 
+    private void initSystemVmTemplateRegistration() {
+        systemVmTemplateRegistration = new SystemVmTemplateRegistration("");
+    }
+
     @Override
     public void updateSystemVmTemplates(Connection conn) {
         LOG.debug("Updating System Vm template IDs");
@@ -83,8 +88,4 @@ public class Upgrade41900to41910 implements DbUpgrade, 
DbUpgradeSystemVmTemplate
             throw new CloudRuntimeException("Failed to find / register 
SystemVM template(s)");
         }
     }
-
-    private void initSystemVmTemplateRegistration() {
-        systemVmTemplateRegistration = new SystemVmTemplateRegistration("");
-    }
 }
diff --git 
a/engine/schema/src/main/resources/META-INF/db/schema-41900to41910.sql 
b/engine/schema/src/main/resources/META-INF/db/schema-41900to41910.sql
index 358cc9d2979..de9c62258c8 100644
--- a/engine/schema/src/main/resources/META-INF/db/schema-41900to41910.sql
+++ b/engine/schema/src/main/resources/META-INF/db/schema-41900to41910.sql
@@ -31,6 +31,10 @@ SET usage_unit = 'IOPS', updated_on = NOW()
 WHERE effective_on = '2010-05-04 00:00:00'
 AND name IN ('VM_DISK_IO_READ', 'VM_DISK_IO_WRITE');
 
+-- allow for bigger urls
+
+ALTER TABLE `cloud`.`vm_template` MODIFY COLUMN `url` VARCHAR(1024) DEFAULT 
NULL COMMENT 'the url where the template exists externally';
+
 -- PR #7235 - [Usage] Create VPC billing
 CREATE TABLE IF NOT EXISTS `cloud_usage`.`usage_vpc` (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,

Reply via email to