Add connection to database when it is moved.