projects/prisma7-config/walkthrough.md
cf2bc1f4b2...be55dae684Let Prisma 7 and Prisma 8 coexist without competing for the same automatically discovered config file. Prisma 7 gains a canonical prisma7.config.* namespace while preserving existing prisma.config.* projects as a quiet compatibility path.
prisma7.config.* candidates, then all .config/prisma7.* candidates, then the existing c12-backed legacy search.index.* forms, without adding legacy data-format candidates.prisma7.config.ts, while retaining their respective config-package imports.Prisma 7-specific files take precedence across the full supported family: automatic discovery checks prisma7.config.{js,ts,mjs,cjs,mts,cts} at the root, then .config/prisma7.*, before legacy candidates. Explicit config paths still win, and paths declared inside either versioned location remain relative to the selected file.
Fallback is absence-only and quiet: a selected versioned file that cannot load or validate now hard-fails with that file's attribution. When no versioned candidate exists, legacy prisma.config.* discovery continues without a new warning; when neither family exists, the default config remains unchanged.
Bootstrap matches supported runtime selection without executing config: project-state detection and seed inspection use the exported non-executing selector instead of checking only prisma.config.ts. Its legacy mirror covers supported JavaScript/TypeScript flat and index.* candidates in c12 order, while deliberately excluding JSON, JSONC, JSON5, YAML, YML, and TOML. package.json remains the first source for seed commands.
New projects and concrete guidance use prisma7.config.ts: prisma init and prisma7 init write only the versioned filename. Generated contents continue to import from prisma/config or @prisma/prisma7/config according to CLI identity, and completion, Studio/Validate examples, schema errors, migrate help, seed instructions, and initialization output point to the same filename. Generic references remain “Prisma config file.”
The packed distribution proves both entrypoints share the contract: the compatibility E2E runs precedence, versioned-file failure, exact quiet legacy fallback, and init assertions through installed .bin/prisma7 and the packed transitive prisma/build/index.js entry. It also checks each identity's generated import while preserving the existing generated-client smoke coverage.
prisma.config.* need no rename and receive no new fallback warning; the installed E2E locks the existing loaded-file diagnostic exactly.--config path remains authoritative regardless of filename.prisma7.config.* intentionally blocks legacy fallback. Fix or remove that file to resume legacy discovery.--config semantics or unrelated Prisma filenames and terminology.