Skip to content

Commit fcbd538

Browse files
committed
fix: make datasource url optional
1 parent e2e2024 commit fcbd538

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/schema/src/language-server/validator/datasource-validator.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ export default class DataSourceValidator implements AstValidator<DataSource> {
4343
private validateUrl(ds: DataSource, accept: ValidationAcceptor) {
4444
const url = ds.fields.find((f) => f.name === 'url');
4545
if (!url) {
46-
accept('error', 'datasource must include a "url" field', {
47-
node: ds,
48-
});
46+
// url field is optional for new versions of Prisma
47+
return;
4948
}
5049

5150
for (const fieldName of ['url', 'shadowDatabaseUrl']) {

0 commit comments

Comments
 (0)