クエリ修正

This commit is contained in:
r-ca 2024-01-24 18:40:11 +09:00
parent 0b7b499624
commit c1c705729a
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -57,6 +57,6 @@ public interface VcsLogDao {
@Query("DELETE FROM vcs_log WHERE id = :id")
void deleteById(String id);
@Query("DELETE FROM vcs_log WHERE document_id = :documentId LIMIT 1")
@Query("DELETE FROM vcs_log WHERE id = (SELECT id FROM vcs_log WHERE document_id = :documentId ORDER BY created_at DESC LIMIT 1)")
void deleteLatestByDocumentId(String documentId);
}