shwstppr opened a new pull request #5274:
URL: https://github.com/apache/cloudstack/pull/5274


   ### Description
   
   Fixes #4897
   Some details tables were allowing null values for detail value which can 
cause NPE in some cases.
   mysql> SELECT TABLE_NAME, COLUMN_NAME, COLUMN_TYPE FROM 
information_schema.columns WHERE table_schema='cloud' AND table_name 
LIKE'%_details' AND column_name='value' AND IS_NULLABLE='YES';
   +-------------------------------+-------------+---------------+
   | TABLE_NAME                    | COLUMN_NAME | COLUMN_TYPE   |
   +-------------------------------+-------------+---------------+
   | account_details               | value       | varchar(255)  |
   | cluster_details               | value       | varchar(255)  |
   | data_center_details           | value       | varchar(1024) |
   | domain_details                | value       | varchar(255)  |
   | image_store_details           | value       | varchar(255)  |
   | storage_pool_details          | value       | varchar(255)  |
   | template_deploy_as_is_details | value       | text          |
   | user_vm_deploy_as_is_details  | value       | text          |
   | user_vm_details               | value       | varchar(5120) |
   +-------------------------------+-------------+---------------+
   9 rows in set (0.00 sec)
   
   Brings consistency for value column of *_details tables with preventing null 
values.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
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