Move database attaches to SRDatabaseHelper to reduce number of
transactions to be performed when upgrading from v1.