正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
| @@ -15,6 +15,11 @@ exports = module.exports = function(settings) { | @@ -15,6 +15,11 @@ exports = module.exports = function(settings) { | ||
| 15 | created_at: Date | 15 | created_at: Date |
| 16 | }) | 16 | }) |
| 17 | 17 | ||
| 18 | + if (settings.mongooseVersioning) | ||
| 19 | + Schema.add({ | ||
| 20 | + __versions: [] | ||
| 21 | + }) | ||
| 22 | + | ||
| 18 | Schema.pre('save', function(next) { | 23 | Schema.pre('save', function(next) { |
| 19 | 24 | ||
| 20 | var that = this | 25 | var that = this |
请
注册
或
登录
后发表评论