1
1
---
2
+ name : ' github.com/liam-hq/liam/pull/1033'
3
+
2
4
assert :
3
5
- type : llm-rubric
4
6
value : The report mentions about ensuring that this table is empty before the migration
5
- - type : is-json
6
7
- type : javascript
7
8
# `feedbacks` Test 1: Check if the snippet has the exact correct file path
8
9
value : |
@@ -19,169 +20,14 @@ assert:
19
20
# `bodyMarkdown` Test 2: Check if the bodyMarkdown word count is approximately less than or equal to 80
20
21
value : |
21
22
output.bodyMarkdown.split(" ").length <= 80
22
- - type : cost
23
- threshold : 0.008
24
23
25
24
vars :
26
- ' # ref ' : github.com/liam-hq/liam/pull/1033
25
+ prDescription : ' '
26
+ prComments : ' '
27
27
docsContent : ' '
28
- schemaFiles :
29
- - filename : frontend/packages/db/prisma /schema.prisma
28
+ schemaFile :
29
+ filename : frontend/packages/db/schema /schema.sql
30
30
content : |
31
- datasource db {
32
- provider = "postgresql"
33
- // NOTE: Use the non-pooling URL to avoid PrismaClientUnknownRequestError for now
34
- url = env("POSTGRES_URL_NON_POOLING")
35
- }
36
-
37
- generator client {
38
- provider = "prisma-client-js"
39
- binaryTargets = ["native", "rhel-openssl-3.0.x", "debian-openssl-3.0.x"]
40
- }
41
-
42
- model Project {
43
- id Int @id @default(autoincrement())
44
- name String
45
- createdAt DateTime @default(now())
46
- updatedAt DateTime @updatedAt
47
- reviews OverallReview[]
48
- repositoryMappings ProjectRepositoryMapping[]
49
- watchSchemaFilePatterns WatchSchemaFilePattern[]
50
- docs Doc[]
51
- knowledgeSuggestions KnowledgeSuggestion[]
52
- githubDocFilePaths GitHubDocFilePath[]
53
- }
54
-
55
- model Repository {
56
- id Int @id @default(autoincrement())
57
- name String
58
- owner String
59
- installationId BigInt
60
- isActive Boolean @default(true)
61
- createdAt DateTime @default(now())
62
- updatedAt DateTime @updatedAt
63
-
64
- pullRequests PullRequest[]
65
- projectMappings ProjectRepositoryMapping[]
66
-
67
- @@unique([owner, name])
68
- }
69
-
70
- model PullRequest {
71
- id Int @id @default(autoincrement())
72
- pullNumber BigInt
73
- commentId BigInt?
74
- createdAt DateTime @default(now())
75
- updatedAt DateTime @updatedAt
76
- migration Migration?
77
- repositoryId Int
78
- repository Repository @relation(fields: [repositoryId], references: [id])
79
- reviews OverallReview[]
80
-
81
- @@unique([repositoryId, pullNumber])
82
- }
83
-
84
- model Migration {
85
- id Int @id @default(autoincrement())
86
- title String
87
- pullRequestId Int @unique
88
- pullRequest PullRequest @relation(fields: [pullRequestId], references: [id])
89
- createdAt DateTime @default(now())
90
- updatedAt DateTime @updatedAt
91
- }
92
-
93
- model OverallReview {
94
- id Int @id @default(autoincrement())
95
- projectId Int?
96
- project Project? @relation(fields: [projectId], references: [id])
97
- pullRequestId Int
98
- pullRequest PullRequest @relation(fields: [pullRequestId], references: [id])
99
- branchName String
100
- reviewComment String?
101
- reviewedAt DateTime @default(now())
102
- createdAt DateTime @default(now())
103
- updatedAt DateTime @updatedAt
104
- }
105
-
106
- model ProjectRepositoryMapping {
107
- id Int @id @default(autoincrement())
108
- projectId Int
109
- project Project @relation(fields: [projectId], references: [id])
110
- repositoryId Int
111
- repository Repository @relation(fields: [repositoryId], references: [id])
112
- createdAt DateTime @default(now())
113
- updatedAt DateTime @updatedAt
114
-
115
- @@unique([projectId, repositoryId])
116
- }
117
-
118
- model WatchSchemaFilePattern {
119
- id Int @id @default(autoincrement())
120
- pattern String
121
- projectId Int
122
- project Project @relation(fields: [projectId], references: [id])
123
- createdAt DateTime @default(now())
124
- updatedAt DateTime @updatedAt
125
- }
126
-
127
- model Doc {
128
- id Int @id @default(autoincrement())
129
- title String
130
- content String
131
- latestVersionId Int?
132
- projectId Int
133
- project Project @relation(fields: [projectId], references: [id])
134
- createdAt DateTime @default(now())
135
- updatedAt DateTime @updatedAt
136
-
137
- versions DocVersion[]
138
- }
139
-
140
- model DocVersion {
141
- id Int @id @default(autoincrement())
142
- docId Int
143
- doc Doc @relation(fields: [docId], references: [id])
144
- version Int
145
- title String
146
- content String
147
- createdAt DateTime @default(now())
148
-
149
- @@unique([docId, version])
150
- }
151
-
152
- enum KnowledgeType {
153
- SCHEMA
154
- DOCS
155
- }
156
-
157
- model KnowledgeSuggestion {
158
- id Int @id @default(autoincrement())
159
- type KnowledgeType // Either Schema or Docs
160
- title String // Used as commit message
161
- path String // Target file path
162
- content String // Full content of the new file
163
- fileSha String // SHA of the file to be updated
164
- branchName String // Branch name for GitHub operations
165
- projectId Int
166
- project Project @relation(fields: [projectId], references: [id])
167
- approvedAt DateTime? // Approval timestamp (null if not approved)
168
- createdAt DateTime @default(now())
169
- updatedAt DateTime @updatedAt
170
- }
171
-
172
- model GitHubDocFilePath {
173
- id Int @id @default(autoincrement())
174
- path String // File path in GitHub repository
175
- isReviewEnabled Boolean @default(true) // Whether ReviewAgent should read this file
176
- projectId Int
177
- project Project @relation(fields: [projectId], references: [id])
178
- createdAt DateTime @default(now())
179
- updatedAt DateTime @updatedAt
180
-
181
- @@unique([path, projectId]) // Composite unique key to ensure no duplicate paths within a project
182
- }
183
- - filename : frontend/packages/db/schema/schema.sql
184
- content : |+
185
31
--
186
32
-- PostgreSQL database dump
187
33
--
0 commit comments