Skip to content

Commit a89b049

Browse files
committed
changes in error messages
1 parent d8377e5 commit a89b049

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drizzle-seed/src/services/SeedService.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ export class SeedService {
111111
if (!tablesInOutRelations[table.name]?.dependantTableNames.has(fkTableName)) {
112112
const reason = tablesInOutRelations[table.name]?.selfRelation === true
113113
? `"${table.name}" table has self reference`
114-
: `"${fkTableName}" table doesn't have reference to "${table.name}" table or`
115-
+ `\n you didn't include your one-to-many relation in the seed function schema`;
114+
: `"${fkTableName}" table doesn't have a reference to "${table.name}" table or`
115+
+ `\nyou didn't include your one-to-many relation in the seed function schema`;
116116
throw new Error(
117-
`${reason}.` + `\nYou can't specify "${fkTableName}" as parameter in ${table.name}.with object.`,
117+
`${reason}.` + `\nYou can't specify "${fkTableName}" as parameter in ${table.name}.with object.`
118+
+ `\n\nFor more details, check this: https://orm.drizzle.team/docs/guides/seeding-using-with-option`,
118119
);
119120
}
120121

0 commit comments

Comments
 (0)