Remove automatic database switching.
Add before filter to application controller to switch the database