diff --git a/models/stories/index.ts b/models/stories/index.ts index 6d4acd1..4c84b9d 100644 --- a/models/stories/index.ts +++ b/models/stories/index.ts @@ -87,6 +87,6 @@ const StorySchema = new mongoose.Schema({ default: new Date(), }, }); -hasMigrated && !mongoose.models.Story && Chapter.plugin(AutoIncrement, { id: "chapterid", inc_field: "id" }); +hasMigrated && Chapter.plugin(AutoIncrement, { id: "chapterid", inc_field: "id" }); hasMigrated && StorySchema.plugin(AutoIncrement, { id: "storyid" }); export const Story: Model = /* mongoose.models.Story || */ mongoose.model("Story", StorySchema, "stories");