How to fix P3007: Some of the requested preview features are not yet allowed in schema engine in Prisma

PrismaINTERMEDIATEMEDIUMUpdated Dec 22, 2025· 116 views

The Prisma P3007 error occurs when you try to use preview features in your Prisma schema that are not yet supported by the schema engine for migrations. This typically happens when using experimental features that require specific Prisma versions or configuration. The fix involves removing unsupported preview features or updating your Prisma setup.

Quick fix

Fixes P3007: Some of the requested preview features are not yet allowed in schema engine

P3007: Some of the requested preview features are not yet allowed in schema engine.
Please remove them from your data model before using migrations. (blocked: extendedIndexes, referentialIntegrity)
  1. Identify the blocked preview features
  2. Remove or disable the blocked preview features
  3. Check Prisma version compatibility
  4. Update Prisma dependencies
prisma — error
P3007: Some of the requested preview features are not yet allowed in schema engine.
Please remove them from your data model before using migrations. (blocked: extendedIndexes, referentialIntegrity)
P3007: Some of the requested preview features are not yet allowed in schema engine

What this error means

The P3007 error in Prisma indicates that your Prisma schema contains preview features that cannot be processed by the current schema engine when running migrations. Preview features are experimental capabilities in Prisma that are not yet stable and may have limitations in how they interact with the migration system. This error is part of the P3000-P3017 range of Prisma errors that relate to migration and schema engine issues. The schema engine is responsible for generating and applying database migrations based on your Prisma schema. When it encounters preview features that it doesn't support, it throws this error to prevent potentially destructive or incomplete migrations. The error message typically includes a list of blocked features in parentheses, such as: "(blocked: extendedIndexes, referentialIntegrity)" which tells you exactly which preview features need to be removed or reconfigured. This error is particularly common when: 1. Using a newer Prisma version with an older schema engine 2. Trying to migrate between different Prisma versions with incompatible preview features 3. Using community or experimental preview features not yet integrated into the main schema engine 4. Having preview features enabled that conflict with each other or with your database provider

Typical symptoms

  • Prisma migrate commands fail with P3007 error
  • Error message mentions "Some of the requested preview features are not yet allowed in schema engine"
  • Migration process stops before generating or applying migrations
  • Specific preview features listed in parentheses in the error message
  • Schema validation passes but migration execution fails

Common causes

  1. Using preview features that are not yet supported by the Prisma schema engine for migrations
  2. Mismatch between Prisma Client version and Prisma Migrate/schema engine capabilities
  3. Experimental preview features enabled that are incompatible with your database provider
  4. Preview features that require manual database configuration not handled by migrations
  5. Using preview features from Prisma versions that are not yet stable or released

How to fix "P3007: Some of the requested preview features are not yet allowed in schema engine"

1Identify the blocked preview features

Check the error message for the list of blocked features in parentheses. For example:

bash
P3007: Some of the requested preview features are not yet allowed in schema engine.
Please remove them from your data model before using migrations. (blocked: extendedIndexes, referentialIntegrity)

Make note of which specific features are listed as blocked. These are the features you need to address.

2Remove or disable the blocked preview features

In your schema.prisma file, locate the generator block and remove the blocked preview features from the previewFeatures array:

prisma
// Before - with blocked features
generator client {
  provider = "prisma-client-js"
  previewFeatures = ["extendedIndexes", "referentialIntegrity", "otherFeature"]
}

// After - remove blocked features
generator client {
  provider = "prisma-client-js"
  previewFeatures = ["otherFeature"] // Only keep supported features
}

If you need to keep using these features, you may need to:
1. Check if there's a newer Prisma version that supports them
2. Use raw SQL for the specific functionality
3. Wait for the features to become stable

3Check Prisma version compatibility

Verify your Prisma version supports the preview features you want to use:

bash
# Check installed Prisma version
npx prisma --version

# Check if features are supported in your version
# Visit: https://www.prisma.io/docs/orm/reference/prisma-schema-reference#preview-features

Some preview features may require:
- Minimum Prisma version (e.g., 4.8.0+)
- Specific database providers only
- Additional configuration in datasource block

4Update Prisma dependencies

If you need the preview features, update to a Prisma version that supports them:

bash
# Update Prisma packages
npm install @prisma/client@latest
npm install prisma@latest --save-dev

# Or specify a version that supports your features
npm install @prisma/client@^5.0.0
npm install prisma@^5.0.0 --save-dev

# Regenerate Prisma Client
npx prisma generate

After updating, check if the preview features are now supported by running npx prisma migrate dev --create-only to test without applying migrations.

5Use alternative approaches for unsupported features

For preview features that aren't migration-ready, consider these alternatives:

1. Manual SQL migrations: Create SQL files for the specific feature functionality

sql
-- Example: Manual index creation for extendedIndexes feature
CREATE INDEX idx_user_email ON "User"(email) INCLUDE (name, createdAt);

2. Post-migration hooks: Use Prisma's postgresqlDbExecute or similar for provider-specific SQL

3. Temporary workaround: Disable the feature during migrations, re-enable after

4. Database-native features: Use your database's native capabilities instead of Prisma preview features

6Test migrations after changes

After addressing the preview features, test your migrations:

bash
# Create a migration without applying it
npx prisma migrate dev --create-only

# If successful, apply the migration
npx prisma migrate dev

# For production environments
npx prisma migrate deploy

If you still encounter errors, check:
- All preview features are either removed or confirmed supported
- No syntax errors in your updated schema.prisma
- Database connection is working properly

Advanced notes

Preview Feature Lifecycle: Prisma preview features go through stages: Experimental → Preview → General Availability (GA). Only some preview features are migration-ready. Check the Prisma release notes for feature status updates.

Database Provider Limitations: Some preview features only work with specific database providers. For example:
- referentialIntegrity may have different support in PostgreSQL vs MySQL
- extendedIndexes syntax varies by database
- multiSchema is primarily for PostgreSQL

Migration Lock Files: When you remove preview features, Prisma may generate a new migration that removes the associated database objects. Review the generated SQL before applying.

Team Coordination: If working in a team, ensure everyone uses the same Prisma version and preview feature configuration to avoid "works on my machine" issues.

Production Considerations: Avoid using preview features in production unless absolutely necessary. They may change behavior between Prisma versions without backward compatibility.

Fallback Strategies: For critical features blocked by P3007:
1. Implement at application level instead of database level
2. Use database views or stored procedures
3. Consider if the feature is truly necessary or can be postponed until stable

Frequently asked questions

What does "P3007: Some of the requested preview features are not yet allowed in s" mean?
The P3007 error in Prisma indicates that your Prisma schema contains preview features that cannot be processed by the current schema engine when running migrations. Preview features are experimental capabilities in Prisma that are not yet stable and may have limitations in how they interact with the migration system. This error is part of the P3000-P3017 range of Prisma errors that relate to migration and schema engine issues.
How do I fix "P3007: Some of the requested preview features are not yet allowed in s"?
The Prisma P3007 error occurs when you try to use preview features in your Prisma schema that are not yet supported by the schema engine for migrations. This typically happens when using experimental features that require specific Prisma versions or configuration. The fix involves removing unsupported preview features or updating your Prisma setup.
What causes "P3007: Some of the requested preview features are not yet allowed in s"?
Using preview features that are not yet supported by the Prisma schema engine for migrations Mismatch between Prisma Client version and Prisma Migrate/schema engine capabilities Experimental preview features enabled that are incompatible with your database provider
Is the "P3007: Some of the requested preview features are not yet allowed in s" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading