

(defn original-base-id [{:keys [date bank-account-id description-original company-id amount]} index]
  (str (t/to-time-zone date (t/time-zone-for-offset -7))  "-" description-original "-" (double amount) "-" index "-" company-id))

(defn new-base-id [{:keys [date bank-account-id description-original company-id amount]} index]
  (str (t/to-time-zone date (t/time-zone-for-offset -7)) "-" bank-account-id "-" description-original "-" (double amount) "-" index "-" company-id))

(defn replacements []
 (loop [rows (get-graphql {:limit 100000})
         replacements []
         i 0]
    (let [result (->> rows
           (filter #(= (:id %) (sha-256 (original-base-id % i))))
           (map #(assoc % :new-id (sha-256 (new-base-id % i)))))]
      (if (= 10 i)
        (into replacements result)
        (recur rows (into replacements result ) (inc i))))))
