Skip to content

Commit

Permalink
Merge branch 'main' into feat/global-omit-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell authored Jun 25, 2024
2 parents b00224c + f1d3efa commit f077fb7
Show file tree
Hide file tree
Showing 16 changed files with 212 additions and 145 deletions.
2 changes: 1 addition & 1 deletion content/200-orm/100-prisma-schema/10-overview/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ enum Role {

## Syntax

Prisma Schema files are written in Prisma Schema Language (PSL). See the [data sources](/orm/prisma-schema/overview/data-sources), [generators](/orm/prisma-schema/overview/generators), [data model definition**](/orm/prisma-schema/data-model) and of course [Prisma Schema API reference](/orm/reference/prisma-schema-reference) pages for details and examples.
Prisma Schema files are written in Prisma Schema Language (PSL). See the [data sources](/orm/prisma-schema/overview/data-sources), [generators](/orm/prisma-schema/overview/generators), [data model definition](/orm/prisma-schema/data-model) and of course [Prisma Schema API reference](/orm/reference/prisma-schema-reference) pages for details and examples.

### VS Code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following sample uses [middleware](/orm/prisma-client/client-extensions/midd

<Admonition type="warning">

**Note:** This page demonstrates a sample use of middleware. We do not intend the sample to be a fully functional soft delete feature.
**Note:** This page demonstrates a sample use of middleware. We do not intend the sample to be a fully functional soft delete feature and it does not cover all edge cases. For example, the middleware does not work with nested writes and therefore won't capture situations where you use `delete` or `deleteMany` as an option e.g. in an `update` query.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ name: Deploy
on:
push:
paths:
- ./prisma/migrations/** # Only run this workflow when migrations are updated
- prisma/migrations/** # Only run this workflow when migrations are updated
branches:
- main

Expand Down
10 changes: 6 additions & 4 deletions content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tocDepth: 3

This guide describes how to seed your database using Prisma Client and Prisma ORM's integrated seeding functionality. Seeding allows you to consistently re-create the same data in your database and can be used to:

- Populate your database with data that is required for your application to start - for example, a default language or a default currency.
- Populate your database with data that is required for your application to start, such as a default language or currency.
- Provide basic data for validating and using your application in a development environment. This is particularly useful if you are using Prisma Migrate, which sometimes requires resetting your development database.

</TopBlock>
Expand Down Expand Up @@ -57,17 +57,19 @@ This can be useful to reduce memory usage (RAM) and increase execution speed of

## Integrated seeding with Prisma Migrate

Database seeding happens in two ways with Prisma ORM: manually with `prisma db seed` and automatically in `prisma migrate dev` and `prisma migrate reset`.
Database seeding happens in two ways with Prisma ORM: manually with `prisma db seed` and automatically in `prisma migrate reset` and (in some scenarios) `prisma migrate dev`.

With `prisma db seed`, _you_ decide when to invoke the seed command. It can be useful for a test setup or to prepare a new development environment, for example.

Prisma Migrate also integrates seamlessly with your seeds, assuming you follow the steps in the section below. When Prisma Migrate resets the development database, seeding is triggered automatically if you have a "seed" property in the "prisma" section in your package.json.
Prisma Migrate also integrates seamlessly with your seeds, assuming you follow the steps in the section below. Seeding is triggered automatically when Prisma Migrate resets the development database.

Prisma Migrate resets the database and triggers seeding in the following scenarios:

- You manually run the `prisma migrate reset` CLI command.
- The database is reset interactively in the context of using `prisma migrate dev` - for example, as a result of migration history conflicts or database schema drift.
- When you want to use `prisma migrate dev` or `prisma migrate reset` without seeding, you can pass the --skip-seed flag.
- The database is actually created by `prisma migrate dev`, because it did not exist before.

When you want to use `prisma migrate dev` or `prisma migrate reset` without seeding, you can pass the `--skip-seed` flag.

## Example seed scripts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ await user.save()

## Updating objects

**Prisma ORM **
**Prisma ORM**

```ts
const user = await prisma.user.update({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,13 @@ This module provides several features to streamline the setup and usage of Prism
npx nuxi@latest init test-nuxt-app
```

2. Navigate to project directory and install `@prisma/nuxt`:
2. Navigate to project directory and install `@prisma/nuxt` using the Nuxt CLI:
```terminal
cd test-nuxt-app
npm install @prisma/nuxt
npx nuxi@latest module add @prisma/nuxt
```

3. Add `@prisma/nuxt` to your `nuxt.config.ts`:
```typescript
export default defineNuxtConfig({
modules: ["@prisma/nuxt"],
devtools: { enabled: true },
});
```

4. Start the development server:
3. Start the development server:
```terminal
npm run dev
```
Expand Down Expand Up @@ -85,7 +77,7 @@ This module provides several features to streamline the setup and usage of Prism
5. Install and generate a [Prisma Client](/orm/reference/prisma-client-reference) which enables you to query your DB
6. Prompt you to start the [Prisma Studio](/orm/tools/prisma-studio)

5. You can now use Prisma ORM in your project. If you accepted the prompt to add Prisma Studio, you can access Prisma Studio through the Nuxt Devtools. See the [usage section](#usage) to learn how to use Prisma Client in your app.
4. You can now use Prisma ORM in your project. If you accepted the prompt to add Prisma Studio, you can access Prisma Studio through the Nuxt Devtools. See the [usage section](#usage) to learn how to use Prisma Client in your app.

## Using a different database provider

Expand Down Expand Up @@ -304,4 +296,4 @@ The `usePrismaClient` module does not currently allow for configuration of `Pris

### The `usePrismaClient` composable is not supported in edge runtimes

The `usePrismaClient` composable currently relies on a `PrismaClient` instance that does not work in edge runtimes. If you require edge support for the composable, please let us know on [Discord](https://pris.ly/discord) or [GitHub](https://github.com/prisma/nuxt-prisma).
The `usePrismaClient` composable currently relies on a `PrismaClient` instance that does not work in edge runtimes. If you require edge support for the composable, please let us know on [Discord](https://pris.ly/discord) or [GitHub](https://github.com/prisma/nuxt-prisma).
100 changes: 47 additions & 53 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const config: Config = {
// kapa.ai script
{
src: "https://widget.kapa.ai/kapa-widget.bundle.js",
defer: true,
async: true,
"data-website-id": "1b51bb03-43cc-4ef4-95f1-93288a91b560",
"data-project-name": "Prisma",
"data-project-color": "#2D3748",
Expand All @@ -55,13 +55,10 @@ const config: Config = {
"data-button-box-shadow":
"drop-shadow(0px 0.724px 1.251px rgba(14, 18, 28, 0.02)) drop-shadow(0px 1.608px 2.909px rgba(14, 18, 28, 0.04)) drop-shadow(0px 2.793px 5.225px rgba(14, 18, 28, 0.06)) drop-shadow(0px 4.55px 8.671px rgba(14, 18, 28, 0.07)) drop-shadow(0px 7.485px 14.285px rgba(14, 18, 28, 0.08)) drop-shadow(0px 13.358px 24.966px rgba(14, 18, 28, 0.09)) drop-shadow(0px 33px 54px rgba(14, 18, 28, 0.07))",
},
// Enzuzo Cookies Consent script for prisma.io
{
src: "https://app.enzuzo.com/apps/enzuzo/static/js/__enzuzo-cookiebar.js?uuid=5606ab18-eb9a-11ee-98cc-b303d4429aa8",
},
// Tolt script
{
src: "https://cdn.tolt.io/tolt.js",
async: true,
"data-tolt": "fda67739-7ed0-42d2-b716-6da0edbec191",
},
],
Expand All @@ -70,10 +67,6 @@ const config: Config = {
[
"classic",
{
gtag: {
trackingID: "G-YS7QHR40SL",
anonymizeIP: true,
},
googleTagManager: {
containerId: "GTM-KCGZPWB",
},
Expand Down Expand Up @@ -194,6 +187,51 @@ const config: Config = {
footer: {
style: "dark",
links: [
{
title: "socials",
items: [
{
label: " ",
href: "https://discord.gg/KQyTW2H5ca",
customProps: {
icon: "fa-brands fa-discord",
internal: true,
},
},
{
label: " ",
href: "https://x.com/prisma",
customProps: {
icon: "fa-brands fa-x-twitter",
internal: true,
},
},
{
label: " ",
href: "https://www.youtube.com/prismadata",
customProps: {
icon: "fa-brands fa-youtube",
internal: true,
},
},
{
label: " ",
href: "https://pris.ly/whatsapp",
customProps: {
icon: "fa-brands fa-whatsapp",
internal: true,
},
},
{
label: " ",
href: "https://github.com/prisma",
customProps: {
icon: "fa-brands fa-github",
internal: true,
},
},
],
},
{
title: "Product",
items: [
Expand Down Expand Up @@ -387,50 +425,6 @@ const config: Config = {
},
],
},
{
items: [
{
label: " ",
href: "https://discord.gg/KQyTW2H5ca",
customProps: {
icon: "fa-brands fa-discord",
internal: true,
},
},
{
label: " ",
href: "https://x.com/prisma",
customProps: {
icon: "fa-brands fa-x-twitter",
internal: true,
},
},
{
label: " ",
href: "https://www.youtube.com/prismadata",
customProps: {
icon: "fa-brands fa-youtube",
internal: true,
},
},
{
label: " ",
href: "https://pris.ly/whatsapp",
customProps: {
icon: "fa-brands fa-whatsapp",
internal: true,
},
},
{
label: " ",
href: "https://github.com/prisma",
customProps: {
icon: "fa-brands fa-github",
internal: true,
},
},
],
},
],
logo: {
srcDark: "img/logo-white.svg",
Expand Down
58 changes: 4 additions & 54 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,10 @@ hr {
}
}

.footer__item .fa-brands {
font-size: 24px !important;
}

.internal>i {
display: none;
}
Expand All @@ -748,60 +752,6 @@ hr {
height: 28px;
}

.footer__col:last-child {
position: absolute;
height: var(--footer-bottom-height);
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0;
width: auto;
top: calc(100% + 100px);
left: 0;
}

@media (min-width: 520px) {
.footer__col:last-child {
top: calc(100% + 20px);
right: 0;
left: unset;
}
}

@media (min-width: 768px) {
.footer__col:last-child {
top: calc(100% + 80px);
}
}

@media (min-width: 1040px) {
.footer__col:last-child {
top: calc(100% + 120px);
}
}

.footer__col:last-child>.footer__title {
display: none;
}

.footer__col:last-child>ul {
display: flex;
gap: 20px;
font-size: 1.375rem;
color: white;
}

.footer__col:last-child .footer__item a {
font-size: 1.375rem;
color: white;
}

.footer__col:last-child,
.footer__item a:hover {
color: var(--indigo-link-color);
text-decoration: none;
}

.footer__copyright {
text-align: left;
font-size: 1.125rem;
Expand Down
15 changes: 13 additions & 2 deletions src/theme/Footer/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FooterNewsletterForm } from "@site/src/components/newsletter/FooterNewsletterForm";
import useBaseUrl from "@docusaurus/useBaseUrl";
import clsx from "clsx";
import React from "react";

Expand All @@ -8,18 +8,29 @@ export default function FooterLayout({ style, links, logo, copyright }) {
return (
<footer className={clsx(styles[`footer--dark`], "footer", "footer--dark")}>
<div className={clsx(styles.container, "container", "container-fluid")}>
{logo && <div className={clsx(styles.logo, "margin-bottom--sm")}>{logo}</div>}
{links}
<img
className="footer-scarf"
referrerPolicy="no-referrer-when-downgrade"
alt=""
src="https://static.scarf.sh/a.png?x-pxid=d3850fa1-ff40-448d-9a15-5496ce99c9ae"
/>
<div className={styles.newsletterRow}>
</div>
{(logo || copyright) && (
<div className={clsx(styles[`footer__bottom`], "footer__bottom", "text--center")}>
{logo && <div className="margin-bottom--sm">{logo}</div>}
{copyright}
<div className={styles.complianceLogos}>
<a href="https://trust.prisma.io/" target="__blank" rel="openeer noreferrer" aria-label="Prisma Trust">
<img src={useBaseUrl("/img/icons/gdpr.svg")} alt="gdpr" width={35} height={35}/>
</a>
<a href="https://trust.prisma.io/" target="__blank" rel="openeer noreferrer" aria-label="Prisma Trust">
<img src={useBaseUrl("/img/icons/hipaa.svg")} alt="hipaa" width={62} height={29}/>
</a>
{/* <img src={"/img/icons/iso27.svg"} alt="iso" width={73} height={27}/>
<img src={"/img/icons/soc2.svg"} alt="soc" width={60} height={27}/> */}
</div>
</div>
)}
</div>
Expand Down
Loading

0 comments on commit f077fb7

Please sign in to comment.