Code added for update database automatically.