weizhouapache commented on issue #8669:
URL: https://github.com/apache/cloudstack/issues/8669#issuecomment-1949259798

   > yeah @fabiomatavelli-f3 , I got the problem and the fix is easy but the 
question is in which version we could fix this. a dirty hack for you would just 
be `ALTER TABLE cloud.vm_template MODIFY COLUMN url VARCHAR(1024)`, but you 
will possibly run into issues on upgrades, but this is the statement we would 
put in any of the upcoming upgrade files.
   
   @DaanHoogland 
   the SQL can be executed several times. for example
   ```
   mysql> ALTER TABLE cloud.vm_template MODIFY COLUMN url VARCHAR(1024) DEFAULT 
NULL COMMENT 'the url where the template exists externally';
   Query OK, 0 rows affected (0.10 sec)
   Records: 0  Duplicates: 0  Warnings: 0
   
   mysql> mysql> ALTER TABLE cloud.vm_template MODIFY COLUMN url VARCHAR(1024) 
DEFAULT NUENT 'the url where the template exists externally';
   Query OK, 0 rows affected (0.14 sec)
   Records: 0  Duplicates: 0  Warnings: 0
   
   mysql> ALTER TABLE cloud.vm_template MODIFY COLUMN url VARCHAR(1024) DEFAULT 
NULL COMMENT 'the url where the template exists externally';
   Query OK, 0 rows affected (0.14 sec)
   Records: 0  Duplicates: 0  Warnings: 0
   
   mysql> ALTER TABLE cloud.vm_template MODIFY COLUMN url VARCHAR(1024) DEFAULT 
NULL COMMENT 'the url where the template exists externally';
   Query OK, 0 rows affected (0.10 sec)
   Records: 0  Duplicates: 0  Warnings: 0
   ```
   
   I think it can be put into 4.19.0->4.19.1 upgrade


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to