From 9b4480824d0590d6f962a59582e87be12b66b2bd Mon Sep 17 00:00:00 2001 From: Alex Ruheni <33921841+ruheni@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:38:11 +0100 Subject: [PATCH] docs: imperative vs declarative terminology for Prisma Migrate (#5273) Co-authored-by: Nikolas --- .../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 f6a269797b..138b85f230 100644 --- a/content/200-concepts/100-components/03-prisma-migrate/index.mdx +++ b/content/200-concepts/100-components/03-prisma-migrate/index.mdx @@ -13,13 +13,18 @@ toc: false -Prisma Migrate is an **declarative database schema migration tool** that enables you to: +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 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 can be considered a _hybrid_ database schema migration tool, meaning it has both of _declarative_ and _imperative_ elements: + +- 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, ...). + 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.