forked from UKSOURCE/cms.lams
Fix: warning migration
This commit is contained in:
+1
-2
@@ -5,7 +5,6 @@ const migrationSchema = new mongoose.Schema({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
unique: true,
|
unique: true,
|
||||||
index: true
|
|
||||||
},
|
},
|
||||||
batch: {
|
batch: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -21,7 +20,7 @@ const migrationSchema = new mongoose.Schema({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Index để tìm kiếm nhanh
|
// Index để tìm kiếm nhanh
|
||||||
migrationSchema.index({ name: 1 });
|
// migrationSchema.index({ name: 1 });
|
||||||
migrationSchema.index({ batch: -1 });
|
migrationSchema.index({ batch: -1 });
|
||||||
|
|
||||||
module.exports = mongoose.model('Migration', migrationSchema);
|
module.exports = mongoose.model('Migration', migrationSchema);
|
||||||
|
|||||||
Reference in New Issue
Block a user