add upload image function and migration db