fix(db): prevent superfluous migrations
This commit is contained in:
parent
8b93b6a665
commit
b73557a1ee
@ -179,8 +179,7 @@ getMissingMigrations :: forall m m'.
|
||||
=> ReaderT SqlBackend m (Map ManualMigration (ReaderT SqlBackend m' ()))
|
||||
getMissingMigrations = do
|
||||
$logDebugS "Migration" "Retrieve applied migrations"
|
||||
appliedMigrations <- fmap (map E.unValue) . E.select . E.from $ \appliedMigration -> do
|
||||
E.where_ $ appliedMigration E.^. AppliedMigrationMigration `E.in_` E.valList universeF
|
||||
appliedMigrations <- fmap (map E.unValue) . E.select . E.from $ \appliedMigration -> do
|
||||
return $ appliedMigration E.^. AppliedMigrationMigration
|
||||
return $ customMigrations `Map.withoutKeys` Set.fromList appliedMigrations
|
||||
|
||||
|
||||
@ -966,10 +966,9 @@ multiSelectField' optMsg mkOpts = Field{..}
|
||||
fieldParse optlist _ = do
|
||||
let optlist' = filter notNull optlist
|
||||
readExternal <- view _olReadExternal <$> liftHandler mkOpts
|
||||
return . maybe (Left . SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist') (Right . Just) $ mapM readExternal optlist'
|
||||
-- case mapM readExternal optlist' of
|
||||
-- Nothing -> return $ Left $ SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist'
|
||||
-- res -> return $ Right res
|
||||
return $ case mapM readExternal optlist' of
|
||||
Nothing -> Left $ SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist'
|
||||
res -> Right res
|
||||
|
||||
fieldView theId name attrs val isReq = do
|
||||
opts <- liftHandler mkOpts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user