P
Prisma4d ago
gosip

Help with the new Prisma Config "Migrations" Field Missing

Hey everyone I'm trying to update my code and after running npm i I got Prisma version 6.11^ as part of the update. I knew they were going to deprecate the old method in package.json, but now I'm running into an issue. Every tutorial and the official docs mention a field called migrations in the defineConfig method but I can't find it anywhere. When I try to use it I get the following error: Object literal may only specify known properties and 'migrations' does not exist in type 'PrismaConfig<never>' Here's my code
import { defineConfig } from "prisma/config";

export default defineConfig({
schema: "src/models/schema.prisma",
migrations: { // error Object literal may only specify known properties, and 'migrations' does not exist in type 'PrismaConfig<never>'
seed: "tsx src/lib/seed.ts",
},
});
import { defineConfig } from "prisma/config";

export default defineConfig({
schema: "src/models/schema.prisma",
migrations: { // error Object literal may only specify known properties, and 'migrations' does not exist in type 'PrismaConfig<never>'
seed: "tsx src/lib/seed.ts",
},
});
My main issue is that I want to customize where my seed file and the schema is placed but the docs don't seem to match the latest version of Prisma. I also looked at the Prisma source code and found this type definition:
/**
* Define the configuration for the Prisma Development Kit.
*/
export declare function defineConfig<Env extends Record<string, string | undefined> = never>(configInput: PrismaConfig<Env>): PrismaConfigInternal<Env>;
...
/**
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
* Thanks to the branding, this type is opaque and cannot be constructed directly.
*/
export declare type PrismaConfig<Env extends EnvVars = never> = {
earlyAccess: true;
schema?: string;
studio?: PrismaStudioConfigShape<Env>;
migrate?: PrismaMigrateConfigShape<Env>;
};
/**
* Define the configuration for the Prisma Development Kit.
*/
export declare function defineConfig<Env extends Record<string, string | undefined> = never>(configInput: PrismaConfig<Env>): PrismaConfigInternal<Env>;
...
/**
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
* Thanks to the branding, this type is opaque and cannot be constructed directly.
*/
export declare type PrismaConfig<Env extends EnvVars = never> = {
earlyAccess: true;
schema?: string;
studio?: PrismaStudioConfigShape<Env>;
migrate?: PrismaMigrateConfigShape<Env>;
};
Can anyone help me figure out how I can properly set up a seed file or migrate configuration in the new setup? It seems like the migrations field is no longer valid. Thanks in advance!
No description
No description
1 Reply
Prisma AI Help
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!

Did you find this page helpful?