Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: imperative vs declarative terminology for Prisma Migrate #5273

Merged
merged 16 commits into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ toc: false

</Admonition>

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, ...).

<Tip>

If you are prototyping, consider using the [`db push` command](db-push) - see [Schema prototyping with `db push`](/guides/migrate/prototyping-schema-db-push) <span class="guide"></span> for examples.
Expand Down
Loading