-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: upgrade to prisma v5 #150
Conversation
WalkthroughThe recent changes encompass the creation of new ENUM types, tables, and unique indexes in the SQL migration file. The Prisma schema has been updated with changes in the datasource provider, removal of certain annotations, addition of new fields, and a new model. Changes
Poem
TipsChat with CodeRabbit Bot (
|
✅ Deploy Preview for profound-kringle-30b3e4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (3)
- package-lock.json
- package.json
- prisma/migrations/migration_lock.toml
Files selected for processing (2)
- prisma/migrations/0_init/migration.sql (1 hunks)
- prisma/schema.prisma (6 hunks)
Additional comments: 10
prisma/migrations/0_init/migration.sql (4)
1-6: The creation of new ENUM types "Role" and "Status" is a good practice for maintaining data integrity and consistency. Ensure that the values of these ENUMs are used consistently throughout the application.
77-81: The creation of new tables "Account", "Session", "User", "Review", "EventLog", and "VerificationToken" is a significant change. Ensure that these tables are properly integrated into the application and that all necessary relationships are established.
84-99: The creation of unique indexes is a good practice for optimizing database performance and ensuring data integrity. Ensure that these indexes are used correctly in the application.
102-114: The addition of foreign key constraints is a good practice for maintaining data integrity and consistency. Ensure that these constraints are handled correctly in the application, especially in the case of cascading deletes or updates.
prisma/schema.prisma (6)
1-8: The datasource provider has been changed from "postgresql" to "cockroachdb". Ensure that the CockroachDB is set up correctly and the DATABASE_URL environment variable is updated accordingly.
14-28: The
@db.Text
annotations have been removed from several fields in theAccount
model. This could potentially affect the way data is stored and retrieved. Ensure that this change is compatible with the data types of the corresponding columns in the database.46-52: The
User
model has been updated with new relation fieldshacker
andreviewer
for theReview
model. Ensure that these changes are reflected in the corresponding database schema and that the relations are set up correctly.60-68: The
Review
model has been updated with explicithacker
andreviewer
fields with@relation
annotations. Ensure that these changes are reflected in the corresponding database schema and that the relations are set up correctly.78-84: A new
VerificationToken
model has been added. Ensure that this model is reflected in the corresponding database schema and that the unique constraints are set up correctly.101-103: New ENUM values have been added to the
Status
ENUM. Ensure that these changes are reflected in the corresponding database schema.
* Update README.md (#138) * feat: MacID auth (#137) * fix: updated dependencies * feat: MacID login * fix: deprecated property * fix: lint and prettier --------- Co-authored-by: Krish <[email protected]> * feat: add prisma migration for nextauth ext_expires_in * chore: Migrate trpc v9 to v10 (#140) * init * run codemod * more * lint * chore: fix useQuery in grade endpoint * chore: update naming * chore: lint * chore: use better logic for priority query * chore: lint --------- Co-authored-by: Arian Ahmadinejad <[email protected]> * chore: add format on save as a config (#142) Co-authored-by: Krish <[email protected]> * fix: Changed date of hackathon and version TECH-43 (#141) * changed date of hackathon and version number * format * changed all occurences of DeltaHacks IX -> X * format * added s by accident * chore: upgrade to node 20 (#148) * chore: add nvmrc * feat: .nvmrc to v20 * chore: upgrade to prisma v5 (#150) * chore: upgrade prisma packages * chore: adjust schema for v5 * chore: baseline db * fix(TS): warnings/errors messages (#146) * fixed QRScanner warnings * fixed QRScanner2.tsx warnings and fixed bug with QRScanner.tsx * commented everything out of middleware.ts * removed router from admin.tsx * fixed error on middleware.ts that dissallowed not having an export keyword * fixed scanner.tsx warnings and errors --------- Co-authored-by: Felix Fong <[email protected]> Co-authored-by: Krish <[email protected]> * feat: create custom application form (#149) * feat: init react form hook * chore: run prettier * feat: add schema for dh10 applications * chore: worked on basics of forms * poc form element component * ... * fix: cleanup social buttons * fix: update faq link * feat: add layout * fix: remove for now because we need to migrate away from typeform * feat: add zod schema for prisma make easy types * feat: add zod generation from schema * feat: use DH10 Application zod type * feat: add form * chore: migrate to pnpm * chore: fix CI for pnpm * lint * feat: add basic styling * feat: add more styling * fix: remove zod prisma * fix: remove generated zod types * feat: add questions, update schema * feat: university select * chore: print errors for now * feat: add og * feat: add autofill, application submission route, and more select stuff * fix: university select width * fix: add light mode * feat: allow for collapsable university section * feat: multiselect component * chore: cleanup unused code * feat: add appropirate select components * Update src/schemas/application.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: show when form was autofilled * Update apply.tsx * fix: build error, add apostrophe * fix: update workshop type to array * fix: make fields optional * Update src/pages/apply.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: update question text * fix: pass field prop to component * corrected wasAuoFilled -> wasAutoFilled * fix: can scroll on side of forums * fix: application.getPrevAutofill no more exceptions if the user has no autofill information * fix: adjusted first and last name boxes to flex-row for smaller form factors * fix: make previous hackathon count always positive * add: react-hook-form-persist for localStorage * fix: limited the year field in dates to 4 digits * feat: added localstorage to everything except date fields * added link to resume field on application FE * fixed page * chore: form mostly done 😭 Co-authored-by: Krish <[email protected]> * chore: cleanup code, add errors * feat: significantly improve dashboard speed by prefetching status * fix: date autofill * feat: upgrade to daisyui v4, responsive form * feat: light mode. redefined. (I redid everything) * fix: add back commented gssp * chore: cleanup * chore: better error messags * feat: add word limit indicators * chore: migrate database * chore: remove random gitignore * chore: add bg animation back * chore: remove unused component * fix: remove race condition --------- Co-authored-by: Krish120003 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: jeffreychan <[email protected]> Co-authored-by: Krish <[email protected]> * chore: downgrade next version * fix: multi select vertical spacing (#152) * feat: mobile phone validation (#153) * fix: save forms with persist ids, and remove on load (#151) * fix: detect invalid dates (#154) * fix: detect invalid dates * fix: set possible as const * feat: show submission error * fix: use use effect for local storage manipulation * fix: remove extra type * chore: remove unnecessary type def --------- Co-authored-by: Arian Ahmadinejad <[email protected]> * fix: og image (#155) * fix: change image * feat: add meta tags * fix: title * feat: add theme colors --------- Co-authored-by: Krish120003 <[email protected]> * fix: fix faq link * feat: collect mcmaster EV information (#156) * feat: collect mcmaster EV information * feat: collect mcmaster EV information * chore: update text * fix: typo * feat: install logrocket (#157) * feat: install logrocket * fix: update id * feat: add logrocket identification * fix: identity tracking from session * feat: disable tracking in dev * feat: add an application killswitch (#158) * chore: scaffold page * chore: prelimnary setup for killswitch feature Co-authored-by: Krish <[email protected]> * feat: add config for killswitch * feat: addd killswitch buttons --------- Co-authored-by: Arian Ahmadinejad <[email protected]> --------- Co-authored-by: Arian Ahmadinejad <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Jeffrey Chan <[email protected]> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: jeffreychan <[email protected]> Co-authored-by: Rachelle DeMan <[email protected]>
* Update README.md (#138) * feat: MacID auth (#137) * fix: updated dependencies * feat: MacID login * fix: deprecated property * fix: lint and prettier --------- Co-authored-by: Krish <[email protected]> * feat: add prisma migration for nextauth ext_expires_in * chore: Migrate trpc v9 to v10 (#140) * init * run codemod * more * lint * chore: fix useQuery in grade endpoint * chore: update naming * chore: lint * chore: use better logic for priority query * chore: lint --------- Co-authored-by: Arian Ahmadinejad <[email protected]> * chore: add format on save as a config (#142) Co-authored-by: Krish <[email protected]> * fix: Changed date of hackathon and version TECH-43 (#141) * changed date of hackathon and version number * format * changed all occurences of DeltaHacks IX -> X * format * added s by accident * chore: upgrade to node 20 (#148) * chore: add nvmrc * feat: .nvmrc to v20 * chore: upgrade to prisma v5 (#150) * chore: upgrade prisma packages * chore: adjust schema for v5 * chore: baseline db * fix(TS): warnings/errors messages (#146) * fixed QRScanner warnings * fixed QRScanner2.tsx warnings and fixed bug with QRScanner.tsx * commented everything out of middleware.ts * removed router from admin.tsx * fixed error on middleware.ts that dissallowed not having an export keyword * fixed scanner.tsx warnings and errors --------- Co-authored-by: Felix Fong <[email protected]> Co-authored-by: Krish <[email protected]> * feat: create custom application form (#149) * feat: init react form hook * chore: run prettier * feat: add schema for dh10 applications * chore: worked on basics of forms * poc form element component * ... * fix: cleanup social buttons * fix: update faq link * feat: add layout * fix: remove for now because we need to migrate away from typeform * feat: add zod schema for prisma make easy types * feat: add zod generation from schema * feat: use DH10 Application zod type * feat: add form * chore: migrate to pnpm * chore: fix CI for pnpm * lint * feat: add basic styling * feat: add more styling * fix: remove zod prisma * fix: remove generated zod types * feat: add questions, update schema * feat: university select * chore: print errors for now * feat: add og * feat: add autofill, application submission route, and more select stuff * fix: university select width * fix: add light mode * feat: allow for collapsable university section * feat: multiselect component * chore: cleanup unused code * feat: add appropirate select components * Update src/schemas/application.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: show when form was autofilled * Update apply.tsx * fix: build error, add apostrophe * fix: update workshop type to array * fix: make fields optional * Update src/pages/apply.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: update question text * fix: pass field prop to component * corrected wasAuoFilled -> wasAutoFilled * fix: can scroll on side of forums * fix: application.getPrevAutofill no more exceptions if the user has no autofill information * fix: adjusted first and last name boxes to flex-row for smaller form factors * fix: make previous hackathon count always positive * add: react-hook-form-persist for localStorage * fix: limited the year field in dates to 4 digits * feat: added localstorage to everything except date fields * added link to resume field on application FE * fixed page * chore: form mostly done 😭 Co-authored-by: Krish <[email protected]> * chore: cleanup code, add errors * feat: significantly improve dashboard speed by prefetching status * fix: date autofill * feat: upgrade to daisyui v4, responsive form * feat: light mode. redefined. (I redid everything) * fix: add back commented gssp * chore: cleanup * chore: better error messags * feat: add word limit indicators * chore: migrate database * chore: remove random gitignore * chore: add bg animation back * chore: remove unused component * fix: remove race condition --------- Co-authored-by: Krish120003 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: jeffreychan <[email protected]> Co-authored-by: Krish <[email protected]> * chore: downgrade next version * fix: multi select vertical spacing (#152) * feat: mobile phone validation (#153) * fix: save forms with persist ids, and remove on load (#151) * fix: detect invalid dates (#154) * fix: detect invalid dates * fix: set possible as const * feat: show submission error * fix: use use effect for local storage manipulation * fix: remove extra type * chore: remove unnecessary type def --------- Co-authored-by: Arian Ahmadinejad <[email protected]> * fix: og image (#155) * fix: change image * feat: add meta tags * fix: title * feat: add theme colors --------- Co-authored-by: Krish120003 <[email protected]> * fix: fix faq link * feat: collect mcmaster EV information (#156) * feat: collect mcmaster EV information * feat: collect mcmaster EV information * chore: update text * fix: typo * feat: install logrocket (#157) * feat: install logrocket * fix: update id * feat: add logrocket identification * fix: identity tracking from session * feat: disable tracking in dev * feat: add an application killswitch (#158) * chore: scaffold page * chore: prelimnary setup for killswitch feature Co-authored-by: Krish <[email protected]> * feat: add config for killswitch * feat: addd killswitch buttons --------- Co-authored-by: Arian Ahmadinejad <[email protected]> * fix: min age should be 13 (#160) * fix: drawer exit + mlh hyperlinks (#162) * chore: add mlh hyperlinks * chore: add exit to drawer * chore: house keeping * chore: make macid default login (#163) * chore: make macid default login * chore: make secondary checkbox checked by default * feat: Allow user to redo application (#165) * chore: add button * feat: added application deletion for user redo * chore: lint and format * fix: error handling for deletion failure * fix: typo + lint * chore: change ev form link * fix: make router async * fix: use trpc onsuccess for rerouting * chore: lint * fix: login icon * feat: add logsnag for application deletion --------- Co-authored-by: Krish <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Jeffrey Chan <[email protected]> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: Felix Fong <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: jeffreychan <[email protected]> Co-authored-by: Krish <[email protected]> Co-authored-by: Rachelle DeMan <[email protected]>
Summary by CodeRabbit