Guest User

Untitled

a guest
Oct 13th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. module DB where
  2.  
  3. createUser :: IO ()
  4. createUser = do
  5. let user = User {userIdent = "foo", userPassword = Just "bar"}
  6. runStdoutLoggingT $ withPostgresqlPool connStr 10 $ \pool ->
  7. liftIO $ flip runSqlPersistMPool pool $ do
  8. -- runMigration migrateAll
  9. -- ^ works if this line is present
  10. userId <- insert user
  11. liftIO $ print userId
Add Comment
Please, Sign In to add comment