Skip to content

Commit fbc8982

Browse files
committed
Removed support for legacy attachment refs
1 parent 78bd48b commit fbc8982

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lib/adapter.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,8 @@ export default function FoundationdbAdapter(api, { db, name, revs_limit: revLimi
568568
const newAtt = {};
569569

570570
if (oldAtt) {
571-
if (oldAtt.refs) {
572-
// only update references if this attachment already has them
573-
// since we cannot migrate old style attachments here without
574-
// doing a full db scan for references
575-
newAtt.refs = oldAtt.refs;
576-
newAtt.refs[ref] = true;
577-
}
571+
newAtt.refs = oldAtt.refs;
572+
newAtt.refs[ref] = true;
578573
} else {
579574
newAtt.refs = { [ref]: true };
580575
}

lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export type Attachment = {
6969
data?: string | unknown
7070
}
7171
export type AttachmentRef = {
72-
refs?: Record<Ref, true>
72+
refs: Record<Ref, true>
7373
};
7474
export type DocInfo = {
7575
data: Doc,

0 commit comments

Comments
 (0)