automatic database update script