File tree 3 files changed +42
-0
lines changed
prisma-fmt/tests/text_document_completion
scenarios/referential_actions_relation_mode_prisma
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "isIncomplete" : false ,
3
+ "items" : [
4
+ {
5
+ "label" : " Cascade" ,
6
+ "kind" : 13 ,
7
+ "detail" : " Delete the child records when the parent record is deleted."
8
+ },
9
+ {
10
+ "label" : " Restrict" ,
11
+ "kind" : 13 ,
12
+ "detail" : " Prevent deleting a parent record as long as it is referenced."
13
+ },
14
+ {
15
+ "label" : " NoAction" ,
16
+ "kind" : 13 ,
17
+ "detail" : " Prevent deleting a parent record as long as it is referenced."
18
+ },
19
+ {
20
+ "label" : " SetNull" ,
21
+ "kind" : 13 ,
22
+ "detail" : " Set the referencing fields to NULL when the referenced record is deleted."
23
+ }
24
+ ]
25
+ }
Original file line number Diff line number Diff line change
1
+ datasource db {
2
+ provider = " mongodb "
3
+ url = env (" DATABASE_URL " )
4
+ }
5
+
6
+ model Post {
7
+ id String @id @default (auto () ) @map (" _id " ) @db.ObjectId
8
+ title String
9
+ author User @relation (fields : [authorId ] , references : [id ] , onDelete : <|>)
10
+ authorId String @db.ObjectId
11
+ }
12
+
13
+ model User {
14
+ id String @id @default (auto () ) @map (" _id " ) @db.ObjectId
15
+ posts Post []
16
+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ scenarios! {
35
35
referential_actions_in_progress_2
36
36
referential_actions_middle_of_args_list
37
37
referential_actions_mssql
38
+ referential_actions_relation_mode_prisma
38
39
referential_actions_with_trailing_comma
39
40
datasource_default_completions
40
41
datasource_multischema
You can’t perform that action at this time.
0 commit comments