Skip to content

Commit

Permalink
chore: migrate image data to JSON files
Browse files Browse the repository at this point in the history
  • Loading branch information
yosevu committed Oct 16, 2022
1 parent b2580bc commit 6f81d30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions data/placeImage.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/reviewImage.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions migrate_sparkeats.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
(p/let [connection (mysql/createConnection database)]
(doseq [tablename tablenames]
(p/let [[rows] (.execute connection (select-all tablename))]
(if (has-image? (first rows))
(write-image-files tablename rows)
(write-json-file tablename rows))))
(write-json-file tablename rows)
(when (has-image? (first rows))
(write-image-files tablename rows))))
(.end connection)))

;; entry
Expand Down

0 comments on commit 6f81d30

Please sign in to comment.