mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
65976cb363
Upgrade Mongoose and the Mongo driver in web GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
18 lines
440 B
JavaScript
18 lines
440 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
|
|
const { Schema } = mongoose
|
|
|
|
const DocSnapshotSchema = new Schema(
|
|
{
|
|
project_id: Schema.Types.ObjectId,
|
|
doc_id: Schema.Types.ObjectId,
|
|
version: Number,
|
|
lines: [String],
|
|
pathname: String,
|
|
ranges: Schema.Types.Mixed,
|
|
ts: Date,
|
|
},
|
|
{ collection: 'docSnapshots', minimize: false }
|
|
)
|
|
|
|
exports.DocSnapshot = mongoose.model('DocSnapshot', DocSnapshotSchema)
|