New SQLManager method to fetch view definitions, update checks
on memdiscountadd and memdiscountremove to ensure memType
is not hardcoded to zero