Browse files

Correct and build the sync script

  • Loading branch information...
1 parent 5f53c5b commit cec2ea17d06e17ae43f3c9fe3e3e7b785f32f9b9 Oliver Charles committed Dec 5, 2011
Showing with 14 additions and 3 deletions.
  1. +1 −2 script/find-issues.hs
  2. +13 −1 voting.cabal
View
3 script/find-issues.hs
@@ -27,8 +27,7 @@ main = do
putStrLn "Done!"
where insertIssue dbh issue = do
run dbh (unlines [ "INSERT INTO tmp_issue (title, body, link)"
- , "SELECT * FROM (VALUES (?, ?, ?)) s (title, body, link)"
- , "WHERE s.link NOT IN (SELECT link FROM issue)"
+ , "VALUES (?, ?, ?)"
])
[ toSql $ issueTitle issue
, toSql $ issueBody issue
View
14 voting.cabal
@@ -2,7 +2,7 @@ Name: scheduling-game
Author: Oliver Charles
Build-type: Simple
Version: 0.1
-Cabal-version: >= 1.2
+Cabal-version: >= 1.9
Executable scheduling-game
hs-source-dirs: src
@@ -24,3 +24,15 @@ Executable scheduling-game
transformers >= 0.2.2.0 && < 0.3,
bytestring >= 0.9.1.10 && < 1,
snap-server >= 0.6 && < 0.7
+
+Executable scheduling-game-sync
+ hs-source-dirs: script src
+ Main-is: find-issues.hs
+ Build-depends:
+ base >= 4 && <5,
+ http-enumerator >= 0.7.1 && <0.8,
+ xml-enumerator >= 0.4.1 && < 0.5,
+ text >= 0.11.1.5 && < 0.12,
+ bytestring >= 0.9.1.10 && < 1,
+ HDBC >= 2.3.1.0 && < 3,
+ HDBC-postgresql >= 2.3.2.0 && < 3

0 comments on commit cec2ea1

Please sign in to comment.