oreoaround.blogg.se

Uuid generator api
Uuid generator api










uuid generator api

Arguments in attributes are always named, but in most cases the argument name can be omitted. Field attributes are prefixed with Block attributes are prefixed with attributes take arguments.There are two ways to add attributes to your data model: Relation fields are listed after scalar fields.Įxamples A model named User with two scalar fieldsĪttributes modify the behavior of a field or block (e.g. In version 2.3.0 and later, introspection lists model fields same order as the corresponding columns in the database.Note: You can use the attribute to map a model (for example, User) to a table with a different name that does not match model naming conventions (for example, users).

uuid generator api

You can find the reserved words here and here. Prisma has a number of reserved words that are being used by Prisma internally and therefore cannot be used as a model name.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. Allows you to use a cloud-hosted database as the shadow 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.












Uuid generator api