Im reading from a external db. So I have made this so the database get created the first time the code runs. I only paste the create part. The reading from the external db is code I not allowed to make public.
Collection.create(
name: xxxxxx,
title: xxxxxx,
description: xxxxx,
date: xxxxx,
collectie: xxxxx,
colors: xxxxxx,
small_image: xxxxxx,
)
How can I change this so the next time only record are updated where data has changed so I do not have to do rake:drop and rake db:migrate and then this rake task if I want to have the latest data.
Edit 1: I tried to change to find_or_create but then I see a lot of errrors