cms icon indicating copy to clipboard operation
cms copied to clipboard

migrate Prisma schema to multi-file structure

Open kumarrohitdev opened this issue 11 months ago • 2 comments

PR Fixes:

  • 1
  • 2

Resolves #[Issue Number if there]

Checklist before requesting a review

  • [yes ] I have performed a self-review of my code
  • [yes ] I assure there is no similar/duplicate pull request regarding same issue

kumarrohitdev avatar Mar 26 '25 02:03 kumarrohitdev

Feat: Restructure Prisma schema into multiple files for better maintainability

Enabled the prismaSchemaFolder preview feature in schema.prisma to support a multi-file schema.

Moved models into separate .prisma files inside the prisma/schema/ directory:

user.prisma contains the User model.

enums.prisma contains all enum definitions.

bounty.prisma, community.prisma, content.prisma, course.prisma, and event.prisma contain their respective models.

schema.prisma serves as the main schema file, defining the datasource and generator.

Ensured all relationships work seamlessly across files.

Updated Prisma CLI commands (generate, validate, format) to support the new structure.

This change improves schema organization, enhances readability, and reduces merge conflicts in large teams.

kumarrohitdev avatar Mar 26 '25 02:03 kumarrohitdev

@hkirat @devsargam @siinghd

kumarrohitdev avatar Mar 26 '25 03:03 kumarrohitdev