Skip to content

Instantly share code, notes, and snippets.

@cmoore
Created May 13, 2011 20:00
Show Gist options
  • Save cmoore/971212 to your computer and use it in GitHub Desktop.
Save cmoore/971212 to your computer and use it in GitHub Desktop.
Persistent
migrate = runQ $ runMigration migrateAll
runQ :: MonadControlIO m => SqlPersist m a -> m a
runQ a =
withPostgresqlConn "host=localhost password=fart user=postgres dbname=fart" $
runSqlConn $ do a
share [mkPersist, mkMigrate "migrateAll"] [persist|
Style
name T.Text Eq Ne Desc
path T.Text
dat T.Text
deriving Eq Ord
|]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment