CLOUDSTACK-6603 [Upgrade]DB Exception while Autoscale monitoring after upgrading from 4.3 to 4.4

(cherry picked from commit c282bb3a1293fbbfdb306263ea52464862670fb3)
(cherry picked from commit fc7d0b2a333e510619f14528a72e35bbf9ed7045)