Fix issue #98: Sync notes from dragonroll to foundry
All checks were successful
Test / test (push) Successful in 2s
All checks were successful
Test / test (push) Successful in 2s
This commit is contained in:
@@ -14,7 +14,16 @@ const NoteSchema = new Schema({
|
||||
ref: 'Folder'
|
||||
},
|
||||
color: { type: String },
|
||||
// The journal page this note is written as in the linked Foundry world: the
|
||||
// page of the one "Dragonroll" journal whose rows carry this note's id in
|
||||
// their `dragonroll-foundry.noteId` flag (see the module's notes sync).
|
||||
foundryPageId: { type: String },
|
||||
date: { type: Date, default: Date.now }
|
||||
});
|
||||
|
||||
NoteSchema.index(
|
||||
{ campaign: 1, foundryPageId: 1 },
|
||||
{ unique: true, partialFilterExpression: { foundryPageId: { $type: 'string' } } }
|
||||
);
|
||||
|
||||
module.exports = mongoose.model('Note', NoteSchema);
|
||||
Reference in New Issue
Block a user