╭ changed ───────────────╮ │src/event/Attachment.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │11 // from there rather than from the payload. │ │12 pub const Record = struct { │ │13 event: Self, │ │14 - deleted: bool = false, │ │14 + removed: bool = false, │ │15 author_email: ?[]const u8 = null, │ │16 created_ts: u64 = 0, // the commit timestamp of the event that created this attachment│ │17 name: []const u8, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │80 record │ │81 else blk: { │ │82 var record = existing_record_maybe orelse return error.EventNotFound;│ │83 - record.deleted = true; │ │83 + record.removed = true; │ │84 break :blk record; │ │85 }; │ │86 │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │106 const attachment_cursor = try event_id_to_attachment.putCursor(attachment_key); │ │107 const attachment = try DB.HashMap(.read_write).init(attachment_cursor); │ │108 try evt.upsert(Record, DB, hash_kind, attachment, record_to_write); │ │109 - try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .attach, record_to_write.created_ts); │ │109 + try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .attach, record_to_write.created_ts, record_to_write.removed);│ │110 │ │111 if (existing_cursor_maybe == null) { │ │112 const attachment_id_set_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, id_set_key)); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │114 try attachment_id_set.put(&evt.orderKeyDesc(record_to_write.created_ts, event_id)); │ │115 } │ │116 │ │117 - // tombstones stay in the parent's set; the views skip them │ │117 + // removed attachments stay in the parent's set; the views skip them │ │118 const parent_attachments_cursor = try parent_id_to_attachment_id_set.putCursor(hash.hashInt(hash_kind, &record_to_write.event.parent_id));│ │119 const parent_attachments = try DB.SortedSet(.read_write).init(parent_attachments_cursor); │ │120 try parent_attachments.put(&evt.orderKey(record_to_write.created_ts, event_id)); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯