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
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -87,6 +87,6 @@ const StorySchema = new mongoose.Schema<IStory>({
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<IStory> = /* mongoose.models.Story || */ mongoose.model("Story", StorySchema, "stories");