You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/nestjs-backend/src/features/integrity/link-integrity.service.ts
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ export class LinkIntegrityService {
118
118
119
119
if(!foreignTable){
120
120
issues.push({
121
+
fieldId: field.id,
121
122
type: IntegrityIssueType.ForeignTableNotFound,
122
123
message: `Foreign table with ID ${options.foreignTableId} not found for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
123
124
});
@@ -129,6 +130,7 @@ export class LinkIntegrityService {
message: `Foreign key host table ${options.fkHostTableName} not found for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
134
136
});
@@ -147,13 +149,15 @@ export class LinkIntegrityService {
147
149
148
150
if(!selfKeyExists){
149
151
issues.push({
152
+
fieldId: field.id,
150
153
type: IntegrityIssueType.ForeignKeyNotFound,
151
154
message: `Self key name "${options.selfKeyName}" is missing for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
152
155
});
153
156
}
154
157
155
158
if(!foreignKeyExists){
156
159
issues.push({
160
+
fieldId: field.id,
157
161
type: IntegrityIssueType.ForeignKeyNotFound,
158
162
message: `Foreign key name "${options.foreignKeyName}" is missing for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
159
163
});
@@ -167,6 +171,7 @@ export class LinkIntegrityService {
167
171
168
172
if(!symmetricField){
169
173
issues.push({
174
+
fieldId: field.id,
170
175
type: IntegrityIssueType.SymmetricFieldNotFound,
171
176
message: `Symmetric field ID ${options.symmetricFieldId} not found for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
172
177
});
@@ -175,6 +180,7 @@ export class LinkIntegrityService {
175
180
176
181
if(!options.isOneWay&&!options.symmetricFieldId){
177
182
issues.push({
183
+
fieldId: field.id,
178
184
type: IntegrityIssueType.SymmetricFieldNotFound,
179
185
message: `Symmetric is missing for link field (Field Name: ${field.name}, Field ID: ${field.id}) in table ${table.name}`,
180
186
});
@@ -203,21 +209,22 @@ export class LinkIntegrityService {
0 commit comments