From 5d266fdbd53feac850482e1c3016df75aacba86d Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 22 Aug 2023 17:36:29 +0200 Subject: [PATCH 1/9] chore: add note about datasourceUrl in datasources section --- .../200-api-reference/050-prisma-client-reference.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx index 5aed9bd3b8..bb41fe8e34 100644 --- a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx +++ b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx @@ -65,6 +65,8 @@ This section describes the `PrismaClient` constructor and its parameters. Programmatically overrides properties of the `datasource` block in the `schema.prisma` file - for example, as part of an integration test. See also: [Data sources](/concepts/components/prisma-schema/data-sources) +From version 5.2.0 and upwards, you can also use the [`datasourceUrl`](#datasourceUrl) property to programmatically override the database connection string. + #### Properties | Example property | Example value | Description | From f020e57c040b8fb389cb8de79a4b092b4d2c839c Mon Sep 17 00:00:00 2001 From: ruheni Date: Mon, 4 Sep 2023 15:12:48 +0200 Subject: [PATCH 2/9] Merge branch 'main' of github.com:prisma/docs From 4c0156fd5aaf9fcb507fdbe1cc862e7aedb55219 Mon Sep 17 00:00:00 2001 From: ruheni Date: Mon, 4 Sep 2023 17:09:42 +0200 Subject: [PATCH 3/9] improve: highlight hybrid aspect of Prisma Migrate --- .../100-components/03-prisma-migrate/index.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index 80a978c6bd..5a4f6b8374 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -13,7 +13,12 @@ toc: false -Prisma Migrate is an **declarative database schema migration tool** that enables you to: +Prisma Migrate is both an **imperative and declarative database schema migration tool**. This is because it: + +- Provides declarative data modeling, from which it generates SQL migrations +- Allows you to modify the generated SQL migrations before applying them to your database + +Prisma Migrate enables you to: - Keep your database schema in sync with your [Prisma schema](/concepts/components/prisma-schema) as it evolves _and_ - Maintain existing data in your database From e52e18bd912afd78d6e1f5e4d9ba5b99e382ca6f Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 5 Sep 2023 10:24:52 +0200 Subject: [PATCH 4/9] reorder content --- .../100-components/03-prisma-migrate/index.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index 5a4f6b8374..f46fbb37fa 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -13,11 +13,6 @@ toc: false -Prisma Migrate is both an **imperative and declarative database schema migration tool**. This is because it: - -- Provides declarative data modeling, from which it generates SQL migrations -- Allows you to modify the generated SQL migrations before applying them to your database - Prisma Migrate enables you to: - Keep your database schema in sync with your [Prisma schema](/concepts/components/prisma-schema) as it evolves _and_ @@ -25,6 +20,11 @@ Prisma Migrate enables you to: Prisma Migrate generates [a history of `.sql` migration files](/concepts/components/prisma-migrate/migration-histories), and plays a role in both [development and deployment](/concepts/components/prisma-migrate/migrate-development-production). +Prisma Migrate is both an **imperative and declarative database schema migration tool** because it: + +- Provides declarative data modeling, from which it generates SQL migrations +- Allows you to modify the generated SQL migrations before applying them to your database + If you are prototyping, consider using the [`db push` command](db-push) - see [Schema prototyping with `db push`](/guides/migrate/prototyping-schema-db-push) for examples. From 58c50e0fb21e92f1927098c769160d16490e8348 Mon Sep 17 00:00:00 2001 From: Alex Ruheni <33921841+ruheni@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:25:47 +0100 Subject: [PATCH 5/9] update wording --- .../200-concepts/100-components/03-prisma-migrate/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index a7a355e671..53b64d9f11 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -20,10 +20,10 @@ Prisma Migrate enables you to: Prisma Migrate generates [a history of `.sql` migration files](/concepts/components/prisma-migrate/migration-histories), and plays a role in both [development and production](/concepts/components/prisma-migrate/migrate-development-production). -Prisma Migrate is both an **imperative and declarative database schema migration tool** because it: +Prisma Migrate is a **hybrid** — imperative and declarative — database schema migration tool: -- Provides declarative data modeling, from which it generates SQL migrations -- Allows you to modify the generated SQL migrations before applying them to your database +- Declarative: generates SQL migrations based on your [Prisma schema](/concepts/components/prisma-schema) +- Imperative: provides flexibility by enabling you to modify what and how they're executed and perform data migrations From 180a29396a10f05f09e2fc68422f064d1b7df14e Mon Sep 17 00:00:00 2001 From: Alex Ruheni <33921841+ruheni@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:44:45 +0000 Subject: [PATCH 6/9] Update content/200-concepts/100-components/03-prisma-migrate/index.mdx --- content/200-concepts/100-components/03-prisma-migrate/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index 53b64d9f11..a5f4a51f46 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -23,7 +23,7 @@ Prisma Migrate generates [a history of `.sql` migration files](/concepts/compone Prisma Migrate is a **hybrid** — imperative and declarative — database schema migration tool: - Declarative: generates SQL migrations based on your [Prisma schema](/concepts/components/prisma-schema) -- Imperative: provides flexibility by enabling you to modify what and how they're executed and perform data migrations +- Imperative: provides flexibility by enabling you to modify what and how migrations are executed and perform data migrations From ee3fa3db41f60ed93c6d17a7e899d55e0fec5a75 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Nov 2023 17:34:51 +0100 Subject: [PATCH 7/9] Update content/200-concepts/100-components/03-prisma-migrate/index.mdx --- content/200-concepts/100-components/03-prisma-migrate/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index a5f4a51f46..df32d20563 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -20,7 +20,7 @@ Prisma Migrate enables you to: Prisma Migrate generates [a history of `.sql` migration files](/concepts/components/prisma-migrate/migration-histories), and plays a role in both [development and production](/concepts/components/prisma-migrate/migrate-development-production). -Prisma Migrate is a **hybrid** — imperative and declarative — database schema migration tool: +Prisma Migrate can be considered a _hybrid_ database schema migration tool, meaning it has both of _declarative_ and _imperative_ elements: - Declarative: generates SQL migrations based on your [Prisma schema](/concepts/components/prisma-schema) - Imperative: provides flexibility by enabling you to modify what and how migrations are executed and perform data migrations From 40f353dd08ad7ce65549dbc04f126e27d84a18a2 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Nov 2023 17:37:53 +0100 Subject: [PATCH 8/9] Update content/200-concepts/100-components/03-prisma-migrate/index.mdx --- content/200-concepts/100-components/03-prisma-migrate/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index df32d20563..d6fc01c990 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -23,7 +23,7 @@ Prisma Migrate generates [a history of `.sql` migration files](/concepts/compone Prisma Migrate can be considered a _hybrid_ database schema migration tool, meaning it has both of _declarative_ and _imperative_ elements: - Declarative: generates SQL migrations based on your [Prisma schema](/concepts/components/prisma-schema) -- Imperative: provides flexibility by enabling you to modify what and how migrations are executed and perform data migrations +- Imperative: All generated SQL migration files are fully customizable. Prisma Migrate hence provides the flexibility of an imperative migration tool by enabling you to modify what and how migrations are executed (and allows you to run custom SQL to e.g. make use of native database feature, perform data migrations, ...). From 65c0acdf5e5bf4abaa041748eb2d7c8778c415a5 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Nov 2023 17:37:59 +0100 Subject: [PATCH 9/9] Update content/200-concepts/100-components/03-prisma-migrate/index.mdx --- content/200-concepts/100-components/03-prisma-migrate/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/03-prisma-migrate/index.mdx b/content/200-concepts/100-components/03-prisma-migrate/index.mdx index d6fc01c990..138b85f230 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -22,7 +22,7 @@ Prisma Migrate generates [a history of `.sql` migration files](/concepts/compone Prisma Migrate can be considered a _hybrid_ database schema migration tool, meaning it has both of _declarative_ and _imperative_ elements: -- Declarative: generates SQL migrations based on your [Prisma schema](/concepts/components/prisma-schema) +- Declarative: The data model is described in a declarative way in the [Prisma schema](/concepts/components/prisma-schema). Prisma Migrate generates SQL migration files from that data model. - Imperative: All generated SQL migration files are fully customizable. Prisma Migrate hence provides the flexibility of an imperative migration tool by enabling you to modify what and how migrations are executed (and allows you to run custom SQL to e.g. make use of native database feature, perform data migrations, ...).