diff --git a/hbs2-git3/app/Main.hs b/hbs2-git3/app/Main.hs index 84579e88..c1add987 100644 --- a/hbs2-git3/app/Main.hs +++ b/hbs2-git3/app/Main.hs @@ -736,8 +736,6 @@ export mref' r = connectedDo $ flip runContT pure do void $ putBlock sto s withState $ transactional do - for_ packs $ \href -> do - insertGitPack co href insertCBlock co (HashRef root) notice $ "cblock" <+> pretty root diff --git a/hbs2-git3/lib/HBS2/Git3/State/Direct.hs b/hbs2-git3/lib/HBS2/Git3/State/Direct.hs index f09ff5bf..d2547425 100644 --- a/hbs2-git3/lib/HBS2/Git3/State/Direct.hs +++ b/hbs2-git3/lib/HBS2/Git3/State/Direct.hs @@ -43,15 +43,6 @@ evolveState = do ddl [qc| create table if not exists -gitpack - ( kommit text not null - , pack text not null - , primary key (kommit,pack) - ) -|] - - ddl [qc| -create table if not exists cblock ( kommit text not null primary key , cblock text not null @@ -59,7 +50,6 @@ cblock |] - instance ToField GitHash where toField h = toField (show $ pretty h) @@ -78,18 +68,6 @@ instance ToField HashRef where instance FromField HashRef where fromField = fmap (fromString @HashRef) . fromField @String -insertGitPack :: MonadIO m => GitHash -> HashRef -> DBPipeM m () -insertGitPack co pack = do - insert [qc| - insert into gitpack (kommit,pack) values(?,?) - on conflict (kommit,pack) do nothing - |] (co, pack) - -selectGitPacks :: MonadIO m => GitHash -> DBPipeM m [HashRef] -selectGitPacks gh = do - select [qc|select pack from gitpack where kommit = ? |] (Only gh) - <&> fmap fromOnly - insertCBlock :: MonadIO m => GitHash -> HashRef -> DBPipeM m () insertCBlock co cblk = do insert [qc|