Skip to content

Commit deb7d81

Browse files
authored
Don't use regex for end of block detection in example (#9806)
Co-authored-by: Daniel Cousens <dcousens@users.noreply.github.com>
1 parent 6cf8974 commit deb7d81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/extend-prisma-schema/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const lists = {
1414
db: {
1515
extendPrismaSchema: schema => {
1616
// add a (poor) example of a multi-column unique constraint
17-
return schema.replace(/(model [^}]+)}/g, '$1@@unique([firstName, lastName])\n}')
17+
return schema.slice(0, -1) + '@@unique([firstName, lastName])\n}'
1818
},
1919
},
2020
}),

0 commit comments

Comments
 (0)