-
Notifications
You must be signed in to change notification settings - Fork 0
feat: onboarding flow #484
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
Draft
nicholasjjlim
wants to merge
16
commits into
main
Choose a base branch
from
feat/onboarding-flow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+800
−9
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7dde134
feat: update schema with onboarding fields
nicholasjjlim 59bdaf0
feat: fix hooks
nicholasjjlim 2e48946
feat: onboarding flow
nicholasjjlim 8d01435
feat: add migration script
nicholasjjlim b6d7435
feat: update schema
nicholasjjlim c0aa5b5
feat: update schema
nicholasjjlim 9ee3a64
feat: update frequency text
nicholasjjlim a0be062
feat: add subscribe flow
nicholasjjlim 1eb4769
feat: update bag of chips dimensions
nicholasjjlim 283776b
feat: add onboarding chips image
nicholasjjlim d604ab0
feat: update width
nicholasjjlim a2dbb19
feat: update onboarding implementation
nicholasjjlim a5f94f4
feat: update to use create instead of upsert
nicholasjjlim ca403f6
feat: update image
nicholasjjlim 1e33364
feat: fix styling
nicholasjjlim f25533f
feat: remove unnecessary portal
nicholasjjlim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
prisma/migrations/20260211090850_add_onboarding_fields/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| -- CreateEnum | ||
| CREATE TYPE "LearningFrequency" AS ENUM ('QUICK', 'REGULAR', 'DEEPDIVE'); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "user_profiles" ( | ||
| "user_id" UUID NOT NULL, | ||
| "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "learning_frequency" "LearningFrequency", | ||
| "is_subscribed" BOOLEAN NOT NULL DEFAULT false, | ||
|
|
||
| CONSTRAINT "user_profiles_pkey" PRIMARY KEY ("user_id") | ||
| ); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "user_interests" ( | ||
| "user_id" UUID NOT NULL, | ||
| "collection_id" UUID NOT NULL, | ||
| "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
|
||
|
|
||
| CONSTRAINT "user_interests_pkey" PRIMARY KEY ("user_id","collection_id") | ||
| ); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "user_profiles" ADD CONSTRAINT "user_profiles_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "user_interests" ADD CONSTRAINT "user_interests_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "user_profiles"("user_id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "user_interests" ADD CONSTRAINT "user_interests_collection_id_fkey" FOREIGN KEY ("collection_id") REFERENCES "collections"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
First time encountering using the PK of the parent table as the PK of the dependent table for one-to-one relationship, I did some research on the web and it's a good strategy to implement strict one-to-one relationships with the storage efficiency and performance benefits due to taking advantage of PK default unique constraint instead of additional FK and unique index. 🚀