Set default value of users.email_verified column to false via migration#274
Conversation
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
|
@Zaid-maker is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughA new SQL migration sets the default value of the "email_verified" column in the "users" table to false. The migration metadata is updated with a new schema snapshot reflecting the current state of the database and a corresponding journal entry documenting the migration event. Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/migrations/meta/_journal.json (1)
18-25: Double-check thebreakpoints: trueflag.Every journal entry so far is marked with
"breakpoints": true.
If your migration runner pauses at breakpoints, this will require an extra manual confirmation step in CI/CD and may stall automated deployments.Confirm that this flag is intentional; otherwise set it to
false.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/web/migrations/0002_cuddly_pretty_boy.sql(1 hunks)apps/web/migrations/meta/0002_snapshot.json(1 hunks)apps/web/migrations/meta/_journal.json(1 hunks)
🔇 Additional comments (2)
apps/web/migrations/0002_cuddly_pretty_boy.sql (1)
1-1: Consider back-filling potential NULLs before tightening the default.Changing only the column default does not touch existing rows.
If any historic rows still holdNULLinusers.email_verified, subsequent reads that assume boolean semantics (NOT NULLin the snapshot) will break.Typical pattern:
UPDATE "users" SET "email_verified" = false WHERE "email_verified" IS NULL;Either add this statement to the same migration, or verify there are no NULLs beforehand.
Failure to back-fill could surface as runtime errors once application code starts trusting theNOT NULLcontract.apps/web/migrations/meta/0002_snapshot.json (1)
217-223: Schema snapshot correctly reflects the new default – looks good.
email_verifiedis nowboolean NOT NULL DEFAULT false, in sync with the migration.No further action needed here.
Set default value of users.email_verified column to false via migration
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Screenshots (if applicable)
Add screenshots to help explain your changes.
Checklist:
Additional context
Add any other context about the pull request here.
Summary by CodeRabbit