Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit 050de7a

Browse files
committed
Fix mysql sync
1 parent a3713f9 commit 050de7a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject googlesheets-sql-sync "0.5.1"
1+
(defproject googlesheets-sql-sync "0.5.2"
22
:description "Keep your SQL database in sync with Google Sheets"
33
:url "https://github.com/jorinvo/googlesheets-sql-sync"
44
:license {:name "MIT"

src/googlesheets_sql_sync/db.clj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@
4343
(do (log/info "Table is empty, dropping it")
4444
(jdbc/execute! db (str "drop table " table))
4545
nil))
46-
(catch java.sql.SQLException e (when-not (.contains
47-
(.getMessage e)
48-
(str "ERROR: relation \"" table "\" does not exist"))
49-
(throw e))))))
46+
(catch java.sql.SQLException _))))
5047

5148
(comment
5249
(let [db {:dbtype "postgresql"
@@ -91,7 +88,7 @@
9188
(defn update-table [config sheet]
9289
(let [target (-> sheet :sheet :target)
9390
db (get-in config [:targets (keyword target)])
94-
identifier-quoting (:dbtype identifier-quoting-map)
91+
identifier-quoting (identifier-quoting-map (keyword (:dbtype db)))
9592
table (-> sheet :sheet :table)
9693
rows (:rows sheet)
9794
headers (->> rows

0 commit comments

Comments
 (0)