Run upgrade after migrate

Refs #1165
Fixed opening wrong application view from notification

Closes #717
Use correct context
Added checks for LBE Security Master and for accessibility of the database
Check if database can be read/written
1.99.17 beta