add $fileName to values

This commit is contained in:
Alexander Foremny
2024-06-06 15:20:33 +02:00
parent d39c1665f8
commit febd2d7a24

View File

@@ -127,10 +127,10 @@ initRepo root ref = do
let cls = let cls =
M.toList . M.unionsWith (++) $ M.toList . M.unionsWith (++) $
map (\f -> M.singleton (takeDirectory f) [f]) fs map (\f -> M.singleton (takeDirectory f) [f]) fs
colls <- forM cls $ \(path, (file : files)) -> do colls <- forM cls $ \(path, files) -> do
(value : values) <- do (value : values) <- do
liftIO $ Q.withStore root ref do liftIO . Q.withStore root ref . Q.withCommit cid $ do
mapM (Q.withCommit cid . Q.readFile) (file : files) Q.query (fromString ("SELECT " <> path <> " FROM " <> path))
let schema = U.autoTypes' value values let schema = U.autoTypes' value values
pure $ Collection path files schema pure $ Collection path files schema
let schemaVersion = let schemaVersion =