Closed slugb0t closed 1 month ago
Thank you for submitting this pull request! We appreciate your contribution to the project. Before we can merge it, we need to review the changes you've made to ensure they align with our code standards and meet the requirements of the project. We'll get back to you as soon as we can with feedback. Thanks again!
This pull request refactors the codebase to replace MongoDB with Prisma and PostgreSQL as the database solution. The changes involve updating database operations, modifying schema definitions, and adjusting API endpoints to work with the new Prisma client.
Change | Details | Files |
---|---|---|
Replace MongoDB with Prisma and PostgreSQL |
|
bot/index.js ui/server/api/codeMetadata/[identifier]/index.post.ts ui/server/utils/auth.ts bot/utils/tools/index.js bot/metadata/index.js ui/server/api/dashboard/[owner]/[repo]/index.get.ts bot/cwl/index.js ui/server/api/cwlValidation/[identifier]/rerun.post.ts bot/utils/renderer/index.js bot/license/index.js ui/server/api/license/[identifier]/index.put.ts ui/server/routes/login/github/callback.get.ts ui/server/api/dashboard/[owner]/index.get.ts ui/server/api/codeMetadata/[identifier]/index.put.ts bot/db.js ui/server/api/cwlValidation/[identifier]/index.get.ts ui/server/api/license/[identifier]/index.get.ts ui/server/api/codeMetadata/[identifier]/index.get.ts ui/server/api/dashboard/[owner]/[repo]/rerun.post.ts ui/server/api/user.get.ts bot/scripts/prismaM.ts ui/server/utils/prisma.ts bot/transfer-postgres.js |
Update data models and schema |
|
bot/index.js ui/server/utils/auth.ts bot/utils/tools/index.js bot/metadata/index.js ui/server/api/dashboard/[owner]/[repo]/index.get.ts bot/cwl/index.js bot/utils/renderer/index.js bot/license/index.js ui/server/routes/login/github/callback.get.ts ui/server/api/dashboard/[owner]/index.get.ts ui/server/api/codeMetadata/[identifier]/index.put.ts ui/server/api/cwlValidation/[identifier]/index.get.ts ui/server/api/license/[identifier]/index.get.ts ui/server/api/codeMetadata/[identifier]/index.get.ts ui/server/api/user.get.ts |
Implement data migration strategy |
|
bot/scripts/prismaM.ts bot/transfer-postgres.js |
Update dependencies and configuration |
|
pnpm-lock.yaml |
sequenceDiagram
participant A as Application
participant P as Prisma Client
participant DB as PostgreSQL
A->>P: Make database query
P->>DB: Execute SQL query
DB-->>P: Return query results
P-->>A: Return formatted data
sequenceDiagram
participant U as User
participant A as Auth Handler
participant P as Prisma Adapter
participant DB as PostgreSQL
U->>A: Login request
A->>P: Verify credentials
P->>DB: Query user data
DB-->>P: Return user data
P-->>A: User verification result
A-->>U: Authentication response
Thanks for making updates to your pull request. Our team will take a look and provide feedback as soon as possible. Please wait for any GitHub Actions to complete before editing your pull request. If you have any additional questions or concerns, feel free to let us know. Thank you for your contributions!
Thanks for closing this pull request! If you have any further questions, please feel free to open a new issue. We are always happy to help!
Summary by Sourcery
Migrate the database layer from MongoDB to PostgreSQL using Prisma as the ORM. This involves refactoring database operations throughout the codebase to use Prisma's API, updating data models, and adding necessary dependencies for Prisma. Additionally, scripts are introduced to facilitate data migration from MongoDB to PostgreSQL.
New Features:
Enhancements:
Build:
Chores: