From bf7c7acfc64b8ddf209ce16fa02bd2647c712c93 Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Mon, 1 May 2023 21:28:12 +0300 Subject: [PATCH 01/10] Add instructions to install Prisma Client --- content/100-getting-started/01-quickstart.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index a9ffa2866b..ddcdcc7953 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -113,6 +113,13 @@ Congratulations, you now have your database and tables ready. Let's go and learn ## 4. Explore how to send queries to your database with Prisma Client +First, install Prisma Client using: + +```terminal +npm install @prisma/client +``` +The command installs Prisma Client and automatically runs `prisma generate` to generate a client for your existing models. If you make any new changes to your models, you'll have to rerun `npx prisma generate` to update the client. + To send queries to the database, you will need a TypeScript file to execute your Prisma Client queries. Create a new file called `script.ts` for this purpose: ```terminal From f91ecff77c65010c82bd926b18ace200f442a3b0 Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Tue, 9 May 2023 11:11:31 +0300 Subject: [PATCH 02/10] Update 01-quickstart.mdx implement recommended changes --- content/100-getting-started/01-quickstart.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index ddcdcc7953..fbdef4d467 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -113,12 +113,7 @@ Congratulations, you now have your database and tables ready. Let's go and learn ## 4. Explore how to send queries to your database with Prisma Client -First, install Prisma Client using: - -```terminal -npm install @prisma/client -``` -The command installs Prisma Client and automatically runs `prisma generate` to generate a client for your existing models. If you make any new changes to your models, you'll have to rerun `npx prisma generate` to update the client. +When `npx prisma migrate dev` is run the first time, it installs Prisma Client and runs `prisma generate` to generate a client for your existing models. If you make any new changes to your models, you'll have to rerun `npx prisma generate` to update the client. To send queries to the database, you will need a TypeScript file to execute your Prisma Client queries. Create a new file called `script.ts` for this purpose: From 9b18596ef9d71b0cb893b11017f43c51762c0742 Mon Sep 17 00:00:00 2001 From: Alex Ruheni <33921841+ruheni@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:24:18 +0000 Subject: [PATCH 03/10] Update content/100-getting-started/01-quickstart.mdx --- content/100-getting-started/01-quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 85b5c152df..9176ebc3d7 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -113,7 +113,7 @@ Congratulations, you now have your database and tables ready. Let's go and learn ## 4. Explore how to send queries to your database with Prisma Client -When `npx prisma migrate dev` is run the first time, it installs Prisma Client and runs `prisma generate` to generate a client for your existing models. If you make any new changes to your models, you'll have to rerun `npx prisma generate` to update the client. +When `prisma migrate dev` is run the first time, it installs Prisma Client and runs `prisma generate` to generate a client based on your models. Subsequent changes to your database schema with `prisma migrate dev` will trigger `prisma generate` to regenerate Prisma Client. To send queries to the database, you will need a TypeScript file to execute your Prisma Client queries. Create a new file called `script.ts` for this purpose: From e169d2c966e79291fc07dd4a756f8eae02e74700 Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Tue, 31 Oct 2023 16:23:25 +0300 Subject: [PATCH 04/10] Include prisma client generation with migrate dev --- content/100-getting-started/01-quickstart.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 9176ebc3d7..471f548f16 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -102,10 +102,11 @@ At this point, you have a Prisma schema but no database yet. Run the following c npx prisma migrate dev --name init ``` -This command did two things: +This command did three things: 1. It creates a new SQL migration file for this migration in the `prisma/migrations` directory. -1. It runs the SQL migration file against the database. +2. It runs the SQL migration file against the database. +3. Installs Prisma Client and generates a client based on yur models Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file. @@ -113,8 +114,6 @@ Congratulations, you now have your database and tables ready. Let's go and learn ## 4. Explore how to send queries to your database with Prisma Client -When `prisma migrate dev` is run the first time, it installs Prisma Client and runs `prisma generate` to generate a client based on your models. Subsequent changes to your database schema with `prisma migrate dev` will trigger `prisma generate` to regenerate Prisma Client. - To send queries to the database, you will need a TypeScript file to execute your Prisma Client queries. Create a new file called `script.ts` for this purpose: ```terminal From acba0c5b9884ceeb799c8f86d79ad9142515822b Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Tue, 31 Oct 2023 16:24:36 +0300 Subject: [PATCH 05/10] correct typo --- content/100-getting-started/01-quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 471f548f16..ff29920ebf 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -106,7 +106,7 @@ This command did three things: 1. It creates a new SQL migration file for this migration in the `prisma/migrations` directory. 2. It runs the SQL migration file against the database. -3. Installs Prisma Client and generates a client based on yur models +3. Installs Prisma Client and generates a client based on your models Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file. From 09a31476f024bb99f6b219d88f78772624f62e34 Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Wed, 1 Nov 2023 08:30:01 +0300 Subject: [PATCH 06/10] make recommended changes --- content/100-getting-started/01-quickstart.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index ff29920ebf..cdb2abca95 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -106,7 +106,8 @@ This command did three things: 1. It creates a new SQL migration file for this migration in the `prisma/migrations` directory. 2. It runs the SQL migration file against the database. -3. Installs Prisma Client and generates a client based on your models +3. Runs `prisma generate` under the hood, which installs Prisma Client and generates a Client based on your models. + Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file. From 8b41a8f5f945ef6d2320203fe0d0a0694eb16752 Mon Sep 17 00:00:00 2001 From: Alwoch Sophia Date: Thu, 23 Nov 2023 11:52:23 +0300 Subject: [PATCH 07/10] change tense to past tense --- content/100-getting-started/01-quickstart.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index cdb2abca95..53be17a36e 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -104,9 +104,9 @@ npx prisma migrate dev --name init This command did three things: -1. It creates a new SQL migration file for this migration in the `prisma/migrations` directory. -2. It runs the SQL migration file against the database. -3. Runs `prisma generate` under the hood, which installs Prisma Client and generates a Client based on your models. +1. It created a new SQL migration file for this migration in the `prisma/migrations` directory. +2. It ran the SQL migration file against the database. +3. Ran `prisma generate` under the hood, which installed Prisma Client and generated a Client based on your models. Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file. From 6cb19bfbb62f72516a3ca4c3d8119cb7089bec12 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Nov 2023 10:39:54 +0100 Subject: [PATCH 08/10] Update content/100-getting-started/01-quickstart.mdx --- content/100-getting-started/01-quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 53be17a36e..67fa8fb8b8 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -106,7 +106,7 @@ This command did three things: 1. It created a new SQL migration file for this migration in the `prisma/migrations` directory. 2. It ran the SQL migration file against the database. -3. Ran `prisma generate` under the hood, which installed Prisma Client and generated a Client based on your models. +3. It ran `prisma generate` under the hood, which installed Prisma Client and generated a Client based on your models. Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file. From a3cf023a5f80f18d12766720bf0915bfa3ca92f5 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Nov 2023 10:40:08 +0100 Subject: [PATCH 09/10] Update content/100-getting-started/01-quickstart.mdx --- content/100-getting-started/01-quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 67fa8fb8b8..9fd29e7bb3 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -105,7 +105,7 @@ npx prisma migrate dev --name init This command did three things: 1. It created a new SQL migration file for this migration in the `prisma/migrations` directory. -2. It ran the SQL migration file against the database. +2. It executed the SQL migration file against the database. 3. It ran `prisma generate` under the hood, which installed Prisma Client and generated a Client based on your models. From feb0dbaaff3031eb43eb02a8e35e5f8b37f57ea2 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Fri, 24 Nov 2023 09:33:11 +0100 Subject: [PATCH 10/10] Update content/100-getting-started/01-quickstart.mdx --- content/100-getting-started/01-quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/100-getting-started/01-quickstart.mdx b/content/100-getting-started/01-quickstart.mdx index 9fd29e7bb3..d263f9de57 100644 --- a/content/100-getting-started/01-quickstart.mdx +++ b/content/100-getting-started/01-quickstart.mdx @@ -106,7 +106,7 @@ This command did three things: 1. It created a new SQL migration file for this migration in the `prisma/migrations` directory. 2. It executed the SQL migration file against the database. -3. It ran `prisma generate` under the hood, which installed Prisma Client and generated a Client based on your models. +3. It ran `prisma generate` under the hood (which installed the `@prisma/client` package and generated a tailored Prisma Client API based on your models). Because the SQLite database file didn't exist before, the command also created it inside the `prisma` directory with the name `dev.db` as defined via the environment variable in the `.env` file.