fix(db/models): short-circuit story model definition + plugin load

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2023-12-01 18:01:16 -05:00
parent 3d3580be07
commit 722368c707
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -87,7 +87,8 @@ const StorySchema = new mongoose.Schema<IStory>({
default: new Date(), default: new Date(),
}, },
}); });
hasMigrated && !mongoose.models.Story; hasMigrated &&
!mongoose.models.Story &&
Chapter.plugin(AutoIncrement, { id: "chapterid", inc_field: "id" }); Chapter.plugin(AutoIncrement, { id: "chapterid", inc_field: "id" });
hasMigrated && hasMigrated &&
!mongoose.models.Story && !mongoose.models.Story &&