Skip to content

Commit

Permalink
add example on how to use prisma init --preview-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ruheni committed Oct 27, 2023
1 parent 34eac16 commit 0d48cc0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions content/400-reference/200-api-reference/200-command-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ The `init` command does not interpret any existing files. Instead, it creates a
#### Arguments

| Argument | Required | Description | Default |
|-------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `--datasource-provider` | No | Specifies the default value for the `provider` field in the `datasource` block. Options are `sqlite`, `postgresql`, `mysql`, `sqlserver`, `mongodb` and `cockroachdb`. | `postgresql` |
| `--url` | No | Define a custom datasource url. | |
| `--generator-provider` | No | Define the default generator provider to use. | `prisma-client-js` |
| `--preview-features` | No | Define the default Preview features to use. [Learn more](/concepts/components/preview-features) | |
| `--preview-feature` | No | Define the default Preview features to use. [Learn more](/concepts/components/preview-features) | |
| `--output` | No | Specifies the default output location for the generated client. [Learn more](/concepts/components/prisma-client/working-with-prismaclient/generating-prisma-client#using-a-custom-output-path) | `node_modules/.prisma/client` |

#### Examples
Expand Down Expand Up @@ -356,6 +356,20 @@ prisma init --datasource-provider sqlite

The command output contains helpful information on how to use the generated files and begin using Prisma with your project.

#### Run `prisma init --preview-feature`

```terminal
prisma init --preview-feature multiSchema
```

The command sets `multiSchema` as a default Preview feature in your schema.

```terminal
prisma init --preview-feature multischema --preview-feature metrics
```

The command sets `multiSchema` and `metrics` as the default Preview features in your Prisma schema.

#### Generated Assets

**`prisma/schema.prisma`**
Expand Down

0 comments on commit 0d48cc0

Please sign in to comment.