diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java index df6e7471..7e132ce0 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java @@ -56,4 +56,7 @@ public interface VcsLogDao { // Delete @Query("DELETE FROM vcs_log WHERE id = :id") void deleteById(String id); + + @Query("DELETE FROM vcs_log WHERE document_id = :documentId ORDER BY created_at LIMIT 1") + void deleteLatestByDocumentId(String documentId); }