From 2e9cba462499eb119989867c1b9eac6d28dc07c6 Mon Sep 17 00:00:00 2001 From: Nils Gerstner Date: Mon, 19 Jun 2017 15:03:23 +0200 Subject: [PATCH] add method: does table in db exist? --- .idea/workspace.xml | 157 +++++++++--------- .../deduplicator_jar/deduplicator.jar | Bin 1342264 -> 1342269 bytes src/com/nilsgg/deduplicator/PostSQL.java | 2 +- 3 files changed, 83 insertions(+), 76 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c5c79a2..c0a2f27 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,6 +7,7 @@ + @@ -81,11 +82,11 @@ - + - - + + @@ -94,19 +95,19 @@ - + - - + + - - - - - - - + + + + + + + @@ -731,7 +732,7 @@ - + 1497631430767 @@ -845,15 +846,21 @@ - - - @@ -875,7 +882,7 @@ - + @@ -980,13 +987,13 @@ - - - - - - - + + + + + + + @@ -1065,13 +1072,13 @@ - - - - - - - + + + + + + + @@ -1114,13 +1121,13 @@ - - - - - - - + + + + + + + @@ -1163,13 +1170,13 @@ - - - - - - - + + + + + + + @@ -1212,13 +1219,13 @@ - - - - - - - + + + + + + + @@ -1261,13 +1268,13 @@ - - - - - - - + + + + + + + @@ -1399,29 +1406,29 @@ - + - - + + - - - - - - - + + - + - - + + - - + + + + + + + diff --git a/out/artifacts/deduplicator_jar/deduplicator.jar b/out/artifacts/deduplicator_jar/deduplicator.jar index cf6bd224e3493efb73357409d0f58dcc55d1def0..1f6fe31ee79a430c57abcceaff47456e7ff56e74 100644 GIT binary patch delta 8466 zcmZ`-2Urx@vSxZiAyw=E$hS4(jIig;D6TW$m z#>2b**U0ike-aVLGcC zJ!7_-t#_O*EbgyM7*>|vHMC#ocQ?>y?A`s5+uNY&O@Fh?mKPj_8#`oc7wd{#rn`=} zAiH<&oY-?_!ueC9L&X;Zvo9QYabbaJ{HoU6=Zg+Meo>_0-?3(sp15+^;_!LXDsSIS zAOA*GXS%wNIIE><`MPPRtfqI3FRa-WKeVGG!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w5?!E(KA+_3TvAWA4)}D#J9DW zu^4$VlCjTXAd)peGp^&B zG&Gw?-%U!Du*ec*!I*@dmLN~YCR_pyasC9|@$(6`C|!HeQm{9ClBQLg*zm2A0`}rb z8lA-^=?J#tS;)hor4Y%cR+{N-1x5Jam%=jXNS+abjnk1gBL?TD!yPrKlMGh|Z|r2t z(R0Dc0BhR4G#%OtS)c})2Qp{U3h0OBVnD diff --git a/src/com/nilsgg/deduplicator/PostSQL.java b/src/com/nilsgg/deduplicator/PostSQL.java index dc89b10..782d94d 100644 --- a/src/com/nilsgg/deduplicator/PostSQL.java +++ b/src/com/nilsgg/deduplicator/PostSQL.java @@ -28,7 +28,7 @@ class PostSQL { props.setProperty("password", dbPassword); String DB_URL = "jdbc:postgresql://" + dataBase + "/filedb"; this.conn = DriverManager.getConnection(DB_URL, props); - if (createTable|| isFilesTable()) + if (createTable|| !isFilesTable()) createTable(); }