Skip to content

Instantly share code, notes, and snippets.

@dimsuz
Created April 2, 2020 16:31
Show Gist options
  • Save dimsuz/f8c1008538252c108b383e84f6f6a3bf to your computer and use it in GitHub Desktop.
Save dimsuz/f8c1008538252c108b383e84f6f6a3bf to your computer and use it in GitHub Desktop.
seedEntities1 :: MonadIO m => [MyEntity1] -> ReaderT SqlBackend m ()
seedEntities1 entities = do
deleteWhere ([] :: [Filter MyEntity1])
insert_ entities
seedEntities2 :: MonadIO m => [MyEntity2] -> ReaderT SqlBackend m ()
seedEntities2 entities = do
deleteWhere ([] :: [Filter MyEntity2])
insert_ entities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment