From 80129c587e38f283cebecd426bbd74d4cc4bc2ce Mon Sep 17 00:00:00 2001 From: jakeaturner Date: Tue, 16 Jan 2024 09:42:30 -0800 Subject: [PATCH] fix(Project): add didMigrateWorkbench and projectID index --- server/models/project.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/models/project.ts b/server/models/project.ts index c5148f56..d074a628 100644 --- a/server/models/project.ts +++ b/server/models/project.ts @@ -33,6 +33,7 @@ export interface ProjectInterface extends Document { libreShelf: string; libreCampus: string; didCreateWorkbench?: boolean; + didMigrateWorkbench?: boolean; // migrated from sandbox author: string; authorEmail: string; license: string; @@ -70,6 +71,8 @@ const ProjectSchema = new Schema( projectID: { type: String, required: true, + unique: true, + index: true, }, /** * Project's title. @@ -162,6 +165,13 @@ const ProjectSchema = new Schema( type: Boolean, default: false, }, + /** + * Whether the Project was migrated from a Sandbox. + */ + didMigrateWorkbench: { + type: Boolean, + default: false, + }, /** * Name of the associated Book/resource's author. */