Skip to content

Commit 919e78e

Browse files
committed
Add MLModelResolver
1 parent 873f96b commit 919e78e

28 files changed

+196
-60
lines changed

prisma/generated/type-graphql/enhance.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ const relationResolversInfo = {
7373
};
7474
const modelsInfo = {
7575
Project: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
76-
MLModel: ["id", "modelJSON", "modelParams", "projectID"],
76+
MLModel: ["id", "modelJson", "modelParams", "projectId"],
7777
User: ["id", "name", "bio", "url", "emailUpdates", "datasets"]
7878
};
7979
const inputsInfo = {
8080
ProjectWhereInput: ["AND", "OR", "NOT", "id", "createdAt", "updatedAt", "user", "userId", "name", "isPublic", "summary", "description", "projectJson", "models", "parentId", "parent", "children"],
8181
ProjectOrderByInput: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
8282
ProjectWhereUniqueInput: ["id"],
8383
ProjectScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
84-
MLModelWhereInput: ["AND", "OR", "NOT", "id", "modelJSON", "modelParams", "project", "projectID"],
85-
MLModelOrderByInput: ["id", "modelJSON", "modelParams", "projectID"],
84+
MLModelWhereInput: ["AND", "OR", "NOT", "id", "modelJson", "modelParams", "project", "projectId"],
85+
MLModelOrderByInput: ["id", "modelJson", "modelParams", "projectId"],
8686
MLModelWhereUniqueInput: ["id"],
87-
MLModelScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "modelJSON", "modelParams", "projectID"],
87+
MLModelScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "modelJson", "modelParams", "projectId"],
8888
UserWhereInput: ["AND", "OR", "NOT", "id", "name", "bio", "url", "emailUpdates", "projects", "datasets"],
8989
UserOrderByInput: ["id", "name", "bio", "url", "emailUpdates", "datasets"],
9090
UserWhereUniqueInput: ["id", "name"],
@@ -93,10 +93,10 @@ const inputsInfo = {
9393
ProjectUpdateInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "user", "models", "parent", "children"],
9494
ProjectCreateManyInput: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
9595
ProjectUpdateManyMutationInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson"],
96-
MLModelCreateInput: ["id", "modelJSON", "modelParams", "project"],
97-
MLModelUpdateInput: ["id", "modelJSON", "modelParams", "project"],
98-
MLModelCreateManyInput: ["id", "modelJSON", "modelParams", "projectID"],
99-
MLModelUpdateManyMutationInput: ["id", "modelJSON", "modelParams"],
96+
MLModelCreateInput: ["id", "modelJson", "modelParams", "project"],
97+
MLModelUpdateInput: ["id", "modelJson", "modelParams", "project"],
98+
MLModelCreateManyInput: ["id", "modelJson", "modelParams", "projectId"],
99+
MLModelUpdateManyMutationInput: ["id", "modelJson", "modelParams"],
100100
UserCreateInput: ["id", "name", "bio", "url", "emailUpdates", "datasets", "projects"],
101101
UserUpdateInput: ["id", "name", "bio", "url", "emailUpdates", "datasets", "projects"],
102102
UserCreateManyInput: ["id", "name", "bio", "url", "emailUpdates", "datasets"],
@@ -150,7 +150,7 @@ const inputsInfo = {
150150
NestedBoolNullableWithAggregatesFilter: ["equals", "not", "_count", "_min", "_max"],
151151
UserCreateWithoutProjectsInput: ["id", "name", "bio", "url", "emailUpdates", "datasets"],
152152
UserCreateOrConnectWithoutProjectsInput: ["where", "create"],
153-
MLModelCreateWithoutProjectInput: ["id", "modelJSON", "modelParams"],
153+
MLModelCreateWithoutProjectInput: ["id", "modelJson", "modelParams"],
154154
MLModelCreateOrConnectWithoutProjectInput: ["where", "create"],
155155
MLModelCreateManyProjectInputEnvelope: ["data", "skipDuplicates"],
156156
ProjectCreateWithoutChildrenInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "user", "models", "parent"],
@@ -163,7 +163,7 @@ const inputsInfo = {
163163
MLModelUpsertWithWhereUniqueWithoutProjectInput: ["where", "update", "create"],
164164
MLModelUpdateWithWhereUniqueWithoutProjectInput: ["where", "data"],
165165
MLModelUpdateManyWithWhereWithoutProjectInput: ["where", "data"],
166-
MLModelScalarWhereInput: ["AND", "OR", "NOT", "id", "modelJSON", "modelParams", "projectID"],
166+
MLModelScalarWhereInput: ["AND", "OR", "NOT", "id", "modelJson", "modelParams", "projectId"],
167167
ProjectUpsertWithoutChildrenInput: ["update", "create"],
168168
ProjectUpdateWithoutChildrenInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "user", "models", "parent"],
169169
ProjectUpsertWithWhereUniqueWithoutParentInput: ["where", "update", "create"],
@@ -180,9 +180,9 @@ const inputsInfo = {
180180
ProjectUpsertWithWhereUniqueWithoutUserInput: ["where", "update", "create"],
181181
ProjectUpdateWithWhereUniqueWithoutUserInput: ["where", "data"],
182182
ProjectUpdateManyWithWhereWithoutUserInput: ["where", "data"],
183-
MLModelCreateManyProjectInput: ["id", "modelJSON", "modelParams"],
183+
MLModelCreateManyProjectInput: ["id", "modelJson", "modelParams"],
184184
ProjectCreateManyParentInput: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson"],
185-
MLModelUpdateWithoutProjectInput: ["id", "modelJSON", "modelParams"],
185+
MLModelUpdateWithoutProjectInput: ["id", "modelJson", "modelParams"],
186186
ProjectUpdateWithoutParentInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "user", "models", "children"],
187187
ProjectCreateManyUserInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
188188
ProjectUpdateWithoutUserInput: ["id", "createdAt", "updatedAt", "name", "isPublic", "summary", "description", "projectJson", "models", "parent", "children"]
@@ -191,16 +191,16 @@ const outputsInfo = {
191191
AggregateProject: ["_count", "_min", "_max"],
192192
ProjectGroupBy: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId", "_count", "_min", "_max"],
193193
AggregateMLModel: ["_count", "_min", "_max"],
194-
MLModelGroupBy: ["id", "modelJSON", "modelParams", "projectID", "_count", "_min", "_max"],
194+
MLModelGroupBy: ["id", "modelJson", "modelParams", "projectId", "_count", "_min", "_max"],
195195
AggregateUser: ["_count", "_min", "_max"],
196196
UserGroupBy: ["id", "name", "bio", "url", "emailUpdates", "datasets", "_count", "_min", "_max"],
197197
AffectedRowsOutput: ["count"],
198198
ProjectCountAggregate: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId", "_all"],
199199
ProjectMinAggregate: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
200200
ProjectMaxAggregate: ["id", "createdAt", "updatedAt", "userId", "name", "isPublic", "summary", "description", "projectJson", "parentId"],
201-
MLModelCountAggregate: ["id", "modelJSON", "modelParams", "projectID", "_all"],
202-
MLModelMinAggregate: ["id", "modelJSON", "modelParams", "projectID"],
203-
MLModelMaxAggregate: ["id", "modelJSON", "modelParams", "projectID"],
201+
MLModelCountAggregate: ["id", "modelJson", "modelParams", "projectId", "_all"],
202+
MLModelMinAggregate: ["id", "modelJson", "modelParams", "projectId"],
203+
MLModelMaxAggregate: ["id", "modelJson", "modelParams", "projectId"],
204204
UserCountAggregate: ["id", "name", "bio", "url", "emailUpdates", "datasets", "_all"],
205205
UserMinAggregate: ["id", "name", "bio", "url", "emailUpdates"],
206206
UserMaxAggregate: ["id", "name", "bio", "url", "emailUpdates"]

prisma/generated/type-graphql/enums/MLModelScalarFieldEnum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import * as TypeGraphQL from "type-graphql";
22

33
export enum MLModelScalarFieldEnum {
44
id = "id",
5-
modelJSON = "modelJSON",
5+
modelJson = "modelJson",
66
modelParams = "modelParams",
7-
projectID = "projectID"
7+
projectId = "projectId"
88
}
99
TypeGraphQL.registerEnumType(MLModelScalarFieldEnum, {
1010
name: "MLModelScalarFieldEnum",

prisma/generated/type-graphql/models/MLModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class MLModel {
1616
@TypeGraphQL.Field(_type => String, {
1717
nullable: false
1818
})
19-
modelJSON!: string;
19+
modelJson!: string;
2020

2121
@TypeGraphQL.Field(_type => String, {
2222
nullable: true
@@ -28,5 +28,5 @@ export class MLModel {
2828
@TypeGraphQL.Field(_type => String, {
2929
nullable: false
3030
})
31-
projectID!: string;
31+
projectId!: string;
3232
}

prisma/generated/type-graphql/resolvers/crud/MLModel/args/FindFirstMLModelArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ export class FindFirstMLModelArgs {
3535
@TypeGraphQL.Field(_type => [MLModelScalarFieldEnum], {
3636
nullable: true
3737
})
38-
distinct?: Array<"id" | "modelJSON" | "modelParams" | "projectID"> | undefined;
38+
distinct?: Array<"id" | "modelJson" | "modelParams" | "projectId"> | undefined;
3939
}

prisma/generated/type-graphql/resolvers/crud/MLModel/args/FindManyMLModelArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ export class FindManyMLModelArgs {
3535
@TypeGraphQL.Field(_type => [MLModelScalarFieldEnum], {
3636
nullable: true
3737
})
38-
distinct?: Array<"id" | "modelJSON" | "modelParams" | "projectID"> | undefined;
38+
distinct?: Array<"id" | "modelJson" | "modelParams" | "projectId"> | undefined;
3939
}

prisma/generated/type-graphql/resolvers/crud/MLModel/args/GroupByMLModelArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class GroupByMLModelArgs {
2020
@TypeGraphQL.Field(_type => [MLModelScalarFieldEnum], {
2121
nullable: false
2222
})
23-
by!: Array<"id" | "modelJSON" | "modelParams" | "projectID">;
23+
by!: Array<"id" | "modelJson" | "modelParams" | "projectId">;
2424

2525
@TypeGraphQL.Field(_type => MLModelScalarWhereWithAggregatesInput, {
2626
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelCreateInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class MLModelCreateInput {
1616
@TypeGraphQL.Field(_type => String, {
1717
nullable: false
1818
})
19-
modelJSON!: string;
19+
modelJson!: string;
2020

2121
@TypeGraphQL.Field(_type => String, {
2222
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelCreateManyInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelCreateManyInput {
1515
@TypeGraphQL.Field(_type => String, {
1616
nullable: false
1717
})
18-
modelJSON!: string;
18+
modelJson!: string;
1919

2020
@TypeGraphQL.Field(_type => String, {
2121
nullable: true
@@ -25,5 +25,5 @@ export class MLModelCreateManyInput {
2525
@TypeGraphQL.Field(_type => String, {
2626
nullable: false
2727
})
28-
projectID!: string;
28+
projectId!: string;
2929
}

prisma/generated/type-graphql/resolvers/inputs/MLModelCreateManyProjectInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelCreateManyProjectInput {
1515
@TypeGraphQL.Field(_type => String, {
1616
nullable: false
1717
})
18-
modelJSON!: string;
18+
modelJson!: string;
1919

2020
@TypeGraphQL.Field(_type => String, {
2121
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelCreateWithoutProjectInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelCreateWithoutProjectInput {
1515
@TypeGraphQL.Field(_type => String, {
1616
nullable: false
1717
})
18-
modelJSON!: string;
18+
modelJson!: string;
1919

2020
@TypeGraphQL.Field(_type => String, {
2121
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelOrderByInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class MLModelOrderByInput {
1616
@TypeGraphQL.Field(_type => SortOrder, {
1717
nullable: true
1818
})
19-
modelJSON?: "asc" | "desc" | undefined;
19+
modelJson?: "asc" | "desc" | undefined;
2020

2121
@TypeGraphQL.Field(_type => SortOrder, {
2222
nullable: true
@@ -26,5 +26,5 @@ export class MLModelOrderByInput {
2626
@TypeGraphQL.Field(_type => SortOrder, {
2727
nullable: true
2828
})
29-
projectID?: "asc" | "desc" | undefined;
29+
projectId?: "asc" | "desc" | undefined;
3030
}

prisma/generated/type-graphql/resolvers/inputs/MLModelScalarWhereInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class MLModelScalarWhereInput {
3232
@TypeGraphQL.Field(_type => StringFilter, {
3333
nullable: true
3434
})
35-
modelJSON?: StringFilter | undefined;
35+
modelJson?: StringFilter | undefined;
3636

3737
@TypeGraphQL.Field(_type => StringNullableFilter, {
3838
nullable: true
@@ -42,5 +42,5 @@ export class MLModelScalarWhereInput {
4242
@TypeGraphQL.Field(_type => StringFilter, {
4343
nullable: true
4444
})
45-
projectID?: StringFilter | undefined;
45+
projectId?: StringFilter | undefined;
4646
}

prisma/generated/type-graphql/resolvers/inputs/MLModelScalarWhereWithAggregatesInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class MLModelScalarWhereWithAggregatesInput {
3232
@TypeGraphQL.Field(_type => StringWithAggregatesFilter, {
3333
nullable: true
3434
})
35-
modelJSON?: StringWithAggregatesFilter | undefined;
35+
modelJson?: StringWithAggregatesFilter | undefined;
3636

3737
@TypeGraphQL.Field(_type => StringNullableWithAggregatesFilter, {
3838
nullable: true
@@ -42,5 +42,5 @@ export class MLModelScalarWhereWithAggregatesInput {
4242
@TypeGraphQL.Field(_type => StringWithAggregatesFilter, {
4343
nullable: true
4444
})
45-
projectID?: StringWithAggregatesFilter | undefined;
45+
projectId?: StringWithAggregatesFilter | undefined;
4646
}

prisma/generated/type-graphql/resolvers/inputs/MLModelUpdateInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class MLModelUpdateInput {
1818
@TypeGraphQL.Field(_type => StringFieldUpdateOperationsInput, {
1919
nullable: true
2020
})
21-
modelJSON?: StringFieldUpdateOperationsInput | undefined;
21+
modelJson?: StringFieldUpdateOperationsInput | undefined;
2222

2323
@TypeGraphQL.Field(_type => NullableStringFieldUpdateOperationsInput, {
2424
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelUpdateManyMutationInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class MLModelUpdateManyMutationInput {
1717
@TypeGraphQL.Field(_type => StringFieldUpdateOperationsInput, {
1818
nullable: true
1919
})
20-
modelJSON?: StringFieldUpdateOperationsInput | undefined;
20+
modelJson?: StringFieldUpdateOperationsInput | undefined;
2121

2222
@TypeGraphQL.Field(_type => NullableStringFieldUpdateOperationsInput, {
2323
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelUpdateWithoutProjectInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class MLModelUpdateWithoutProjectInput {
1717
@TypeGraphQL.Field(_type => StringFieldUpdateOperationsInput, {
1818
nullable: true
1919
})
20-
modelJSON?: StringFieldUpdateOperationsInput | undefined;
20+
modelJson?: StringFieldUpdateOperationsInput | undefined;
2121

2222
@TypeGraphQL.Field(_type => NullableStringFieldUpdateOperationsInput, {
2323
nullable: true

prisma/generated/type-graphql/resolvers/inputs/MLModelWhereInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class MLModelWhereInput {
3333
@TypeGraphQL.Field(_type => StringFilter, {
3434
nullable: true
3535
})
36-
modelJSON?: StringFilter | undefined;
36+
modelJson?: StringFilter | undefined;
3737

3838
@TypeGraphQL.Field(_type => StringNullableFilter, {
3939
nullable: true
@@ -48,5 +48,5 @@ export class MLModelWhereInput {
4848
@TypeGraphQL.Field(_type => StringFilter, {
4949
nullable: true
5050
})
51-
projectID?: StringFilter | undefined;
51+
projectId?: StringFilter | undefined;
5252
}

prisma/generated/type-graphql/resolvers/outputs/MLModelCountAggregate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelCountAggregate {
1515
@TypeGraphQL.Field(_type => TypeGraphQL.Int, {
1616
nullable: false
1717
})
18-
modelJSON!: number;
18+
modelJson!: number;
1919

2020
@TypeGraphQL.Field(_type => TypeGraphQL.Int, {
2121
nullable: false
@@ -25,7 +25,7 @@ export class MLModelCountAggregate {
2525
@TypeGraphQL.Field(_type => TypeGraphQL.Int, {
2626
nullable: false
2727
})
28-
projectID!: number;
28+
projectId!: number;
2929

3030
@TypeGraphQL.Field(_type => TypeGraphQL.Int, {
3131
nullable: false

prisma/generated/type-graphql/resolvers/outputs/MLModelGroupBy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class MLModelGroupBy {
1818
@TypeGraphQL.Field(_type => String, {
1919
nullable: false
2020
})
21-
modelJSON!: string;
21+
modelJson!: string;
2222

2323
@TypeGraphQL.Field(_type => String, {
2424
nullable: true
@@ -28,7 +28,7 @@ export class MLModelGroupBy {
2828
@TypeGraphQL.Field(_type => String, {
2929
nullable: false
3030
})
31-
projectID!: string;
31+
projectId!: string;
3232

3333
@TypeGraphQL.Field(_type => MLModelCountAggregate, {
3434
nullable: true

prisma/generated/type-graphql/resolvers/outputs/MLModelMaxAggregate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelMaxAggregate {
1515
@TypeGraphQL.Field(_type => String, {
1616
nullable: true
1717
})
18-
modelJSON!: string | null;
18+
modelJson!: string | null;
1919

2020
@TypeGraphQL.Field(_type => String, {
2121
nullable: true
@@ -25,5 +25,5 @@ export class MLModelMaxAggregate {
2525
@TypeGraphQL.Field(_type => String, {
2626
nullable: true
2727
})
28-
projectID!: string | null;
28+
projectId!: string | null;
2929
}

prisma/generated/type-graphql/resolvers/outputs/MLModelMinAggregate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MLModelMinAggregate {
1515
@TypeGraphQL.Field(_type => String, {
1616
nullable: true
1717
})
18-
modelJSON!: string | null;
18+
modelJson!: string | null;
1919

2020
@TypeGraphQL.Field(_type => String, {
2121
nullable: true
@@ -25,5 +25,5 @@ export class MLModelMinAggregate {
2525
@TypeGraphQL.Field(_type => String, {
2626
nullable: true
2727
})
28-
projectID!: string | null;
28+
projectId!: string | null;
2929
}

prisma/generated/type-graphql/resolvers/relations/Project/args/ProjectModelsArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ export class ProjectModelsArgs {
3535
@TypeGraphQL.Field(_type => [MLModelScalarFieldEnum], {
3636
nullable: true
3737
})
38-
distinct?: Array<"id" | "modelJSON" | "modelParams" | "projectID"> | undefined;
38+
distinct?: Array<"id" | "modelJson" | "modelParams" | "projectId"> | undefined;
3939
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Warnings:
3+
4+
- You are about to drop the column `modelJSON` on the `MLModel` table. All the data in the column will be lost.
5+
- You are about to drop the column `projectID` on the `MLModel` table. All the data in the column will be lost.
6+
- Added the required column `modelJson` to the `MLModel` table without a default value. This is not possible if the table is not empty.
7+
- Added the required column `projectId` to the `MLModel` table without a default value. This is not possible if the table is not empty.
8+
9+
*/
10+
-- DropForeignKey
11+
ALTER TABLE "MLModel" DROP CONSTRAINT "MLModel_projectID_fkey";
12+
13+
-- AlterTable
14+
ALTER TABLE "MLModel" DROP COLUMN "modelJSON",
15+
DROP COLUMN "projectID",
16+
ADD COLUMN "modelJson" TEXT NOT NULL,
17+
ADD COLUMN "projectId" TEXT NOT NULL;
18+
19+
-- AddForeignKey
20+
ALTER TABLE "MLModel" ADD FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE CASCADE ON UPDATE CASCADE;

prisma/schema.prisma

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ model Project {
3434

3535
model MLModel {
3636
id String @id
37-
modelJSON String
37+
modelJson String
3838
modelParams String?
39-
project Project @relation(fields: [projectID], references: [id])
40-
projectID String
39+
project Project @relation(fields: [projectId], references: [id])
40+
projectId String
4141
}
4242

4343
model User {

0 commit comments

Comments
 (0)