You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/recipes/prisma.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Make sure you have a [ConfigModule](https://docs.nestjs.com/techniques/configura
92
92
93
93
SQLite databases are simple files; no server is required to use a SQLite database. So instead of configuring a connection URL with a _host_ and _port_, you can just point it to a local file which in this case is called `dev.db`. This file will be created in the next step.
94
94
95
-
<details><summary>Expand if you're using PostgreSQLor MySQL</summary>
95
+
<details><summary>Expand if you're using PostgreSQL, MySQL, MsSQL or Azure SQL</summary>
96
96
97
97
With PostgreSQL and MySQL, you need to configure the connection URL to point to the _database server_. You can learn more about the required connection URL format [here](https://www.prisma.io/docs/reference/database-reference/connection-urls).
Replace the placeholders spelled in all uppercase letters with your database credentials.
154
154
155
+
**Microsoft SQL Server / Azure SQL Server**
156
+
157
+
If you're using Microsoft SQL Server or Azure SQL Server, you have to adjust the `schema.prisma` and `.env` files as follows:
158
+
159
+
**`schema.prisma`**
160
+
161
+
```groovy
162
+
datasource db {
163
+
provider = "sqlserver"
164
+
url = env("DATABASE_URL")
165
+
}
166
+
167
+
generator client {
168
+
provider = "prisma-client-js"
169
+
}
170
+
```
171
+
172
+
**`.env`**
173
+
174
+
Replace the placeholders spelled in all uppercase letters with your database credentials. Note that if you're unsure what to provide for the `encrypt` placeholder, it's most likely the default value `true`:
0 commit comments