Model names should use the singular form (for example, User instead of user, users or Users).Model names must start with a letter and are typically spelled in PascalCase.Model names must adhere to the following regular expression: *.You must define at least one of the following attributes per model: Every record of a model must be uniquely identifiable.In this example, the target database is available with the following credentials: datasource db is convention - however, you can give your data source any name - for example, datasource mysql or datasource data.Įxamples Specify a PostgreSQL data source. You can only have one datasource block in a schema.Available in preview for PostgreSQL only in Prisma versions 4.5.0 and later. List of strings (PostgreSQL extension names)Īllows you to represent PostgreSQL extensions in your schema. The field is named relationMode in versions 4.5.0 and later, and was previously named referentialIntegrity. Sets whether referential integrity is enforced by foreign keys in the database or emulated in the Prisma Client. The directUrl property is supported by Prisma Studio from version 5.1.0 upwards. If you use a connection pooler URL in the url argument (for example, if you use the Data Proxy or pgBouncer), Prisma CLI commands that require a direct connection to the database use the URL in the directUrl argument. Allows you to use a cloud-hosted database as the shadow database.Ĭonnection URL for direct connection to the database. Most connectors use the syntax provided by the database.Ĭonnection URL to the shadow database used by Prisma Migrate. String ( postgresql, mysql, sqlite, sqlserver, mongodb, cockroachdb)ĭescribes which data source connectors to use.Ĭonnection URL including authentication info.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |