apps/docs/content/docs/orm/prisma-migrate/workflows/unsupported-database-features.mdx
Prisma Migrate uses the Prisma schema to determine what features to create in the database. However, some database features cannot be represented in the Prisma schema , including but not limited to:
To add an unsupported feature to your database, you must customize a migration to include that feature before you apply it.
:::tip
Partial indexes are now supported in Prisma Schema Language via the where argument on @@index, @@unique, and @unique. See Configuring partial indexes for details. You no longer need to customize migrations for partial indexes.
The Prisma schema is also able to represent unsupported field types and native database functions. :::
:::warning This guide does not apply for MongoDB.
Instead of migrate dev, db push is used for MongoDB.
:::
To customize a migration to include an unsupported feature:
--create-only flag to generate a new migration without applying it:npx prisma migrate dev --create-only
migration.sql file and add the unsupported feature - for example, a trigger function:CREATE OR REPLACE FUNCTION notify_on_insert()
RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify('new_record', NEW.id::text);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
npx prisma migrate dev