Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module DB where
- createUser :: IO ()
- createUser = do
- let user = User {userIdent = "foo", userPassword = Just "bar"}
- runStdoutLoggingT $ withPostgresqlPool connStr 10 $ \pool ->
- liftIO $ flip runSqlPersistMPool pool $ do
- -- runMigration migrateAll
- -- ^ works if this line is present
- userId <- insert user
- liftIO $ print userId
Add Comment
Please, Sign In to add comment