Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Add migration system from Prisma and improve overall types and DTO #287

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

HugoRCD
Copy link
Owner

@HugoRCD HugoRCD commented Nov 6, 2024

This pull request includes multiple changes across various files to improve code quality, add new features, and fix bugs. The most important changes include updates to the Prisma schema and migrations, enhancements to the useTeams composable, and various code simplifications.

Database Schema and Migrations:

  • Added new enums TeamRole and Role and updated the User, Member, and Teammate models to use these enums in the Prisma schema (apps/shelve/prisma/schema.prisma). [1] [2] [3]
  • Created new tables and indexes in the migration file (apps/shelve/prisma/migrations/20241106215403_init/migration.sql).
  • Added migration lock file for PostgreSQL (apps/shelve/prisma/migrations/migration_lock.toml).

useTeams Composable Enhancements:

  • Renamed response to _member and updated logic for handling member addition and updates (apps/shelve/app/composables/useTeams.ts). [1] [2]
  • Improved error handling by specifying the error type (apps/shelve/app/composables/useTeams.ts). [1] [2]

Code Simplifications:

Configuration Updates:

  • Added default values for siteUrl and appUrl in the Nuxt configuration files (apps/lp/nuxt.config.ts, apps/shelve/nuxt.config.ts). [1] [2]

Type Improvements:

  • Added type annotations for selectedEnvironment in useVariables composable (apps/shelve/app/composables/useVariables.ts).
  • Updated type imports and usage in users.vue to use User instead of publicUser (apps/shelve/app/pages/admin/users.vue). [1] [2] [3] [4] [5]

These changes collectively improve the maintainability, functionality, and performance of the codebase.

resolve #286

@HugoRCD HugoRCD self-assigned this Nov 6, 2024
Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
shelve-app ⬜️ Ignored (Inspect) Visit Preview Nov 7, 2024 10:47am
shelve-lp ⬜️ Skipped (Inspect) Nov 7, 2024 10:47am

Copy link

github-actions bot commented Nov 6, 2024

Thank you for following the naming conventions! 🙏

- Enhanced type safety in various services by specifying types explicitly.
- Optimized several service methods for better performance and readability.
- Refactored user role checking logic in middleware for clarity.
- Updated Prisma schema to use enums for roles, improving data integrity.
- Created new SQL migration file to reflect changes in the database schema.
- Simplified some API handlers by removing unnecessary lines of code.
@HugoRCD HugoRCD changed the title enhancement: Improve overall types and DTO enhancement: Add migration system from Prisma and improve overall types and DTO Nov 7, 2024
@HugoRCD HugoRCD added feature New feature or request refactor Improved code, clearer, simpler, etc... labels Nov 7, 2024
@vercel vercel bot temporarily deployed to Preview – shelve-lp November 7, 2024 10:35 Inactive
@vercel vercel bot temporarily deployed to Preview – shelve-lp November 7, 2024 10:43 Inactive
@vercel vercel bot temporarily deployed to Preview – shelve-lp November 7, 2024 10:47 Inactive
@HugoRCD HugoRCD merged commit 0b842f3 into main Nov 7, 2024
12 checks passed
@HugoRCD HugoRCD deleted the enhancement/286 branch November 7, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature New feature or request refactor Improved code, clearer, simpler, etc...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: Improve overall types and DTO
1 participant