fix(db/models): remove check for story model's existence
the check will always evaluate to `false`, preventing the chapter id counter from being added
This commit is contained in:
parent
5da97f5987
commit
d38c217a58
@ -87,6 +87,6 @@ const StorySchema = new mongoose.Schema<IStory>({
|
|||||||
default: new Date(),
|
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" });
|
hasMigrated && StorySchema.plugin(AutoIncrement, { id: "storyid" });
|
||||||
export const Story: Model<IStory> = /* mongoose.models.Story || */ mongoose.model("Story", StorySchema, "stories");
|
export const Story: Model<IStory> = /* mongoose.models.Story || */ mongoose.model("Story", StorySchema, "stories");
|
||||||
|
Loading…
Reference in New Issue
Block a user