Fix upgrade procedure
Attach old databases at upgrade time so upgrade goes through properly
Change SRdatabase back to SRtable to ensure onUpgrade gets called.
Make sure to attach database outside of transaction
Refer to SRtable as main
Show dialog while upgrading Database
Revert "Show dialog while upgrading Database"

This reverts commit e7097bf2c2bf471db24364505801e97d65e8b995.