...
|
...
|
@@ -15,6 +15,11 @@ exports = module.exports = function(settings) { |
15
|
15
|
created_at: Date
|
16
|
16
|
})
|
17
|
17
|
|
|
18
|
+ if (settings.mongooseVersioning)
|
|
19
|
+ Schema.add({
|
|
20
|
+ __versions: []
|
|
21
|
+ })
|
|
22
|
+
|
18
|
23
|
Schema.pre('save', function(next) {
|
19
|
24
|
|
20
|
25
|
var that = this
|
...
|
...
|
|