File tree 7 files changed +92
-1
lines changed
prisma-fmt/tests/text_document_completion
referential_actions_relation_mode_fk_mysql
referential_actions_relation_mode_prisma_mongodb
referential_actions_relation_mode_prisma_mysql
7 files changed +92
-1
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
+ "label" : " SetDefault" ,
26
+ "kind" : 13 ,
27
+ "detail" : " Set the referencing field's value to the default when the referenced record is deleted."
28
+ }
29
+ ]
30
+ }
Original file line number Diff line number Diff line change
1
+ datasource db {
2
+ provider = " mysql "
3
+ url = env (" DATABASE_URL " )
4
+ relationMode = " foreignKeys "
5
+ }
6
+
7
+ model Post {
8
+ id Int @id @default (autoincrement () )
9
+ title String
10
+ author User @relation (fields : [authorId ] , references : [id ] , onDelete : <|>)
11
+ authorId Int
12
+ }
13
+
14
+ model User {
15
+ id Int @id @default (autoincrement () )
16
+ posts Post []
17
+ }
File renamed without changes.
File renamed without changes.
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 = " mysql "
3
+ url = env (" DATABASE_URL " )
4
+ relationMode = " prisma "
5
+ }
6
+
7
+ model Post {
8
+ id Int @id @default (autoincrement () )
9
+ title String
10
+ author User @relation (fields : [authorId ] , references : [id ] , onDelete : <|>)
11
+ authorId Int
12
+ }
13
+
14
+ model User {
15
+ id Int @id @default (autoincrement () )
16
+ posts Post []
17
+ }
Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ 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
+ referential_actions_relation_mode_prisma_mongodb
39
+ referential_actions_relation_mode_prisma_mysql
40
+ referential_actions_relation_mode_fk_mysql
39
41
referential_actions_with_trailing_comma
40
42
datasource_default_completions
41
43
datasource_multischema
You can’t perform that action at this time.
0 commit comments