Skip to content

Allow null emails on orgs.#62

Merged
ChrisPenner merged 7 commits into
mainfrom
cp/org-emails
May 5, 2025
Merged

Allow null emails on orgs.#62
ChrisPenner merged 7 commits into
mainfrom
cp/org-emails

Conversation

@ChrisPenner

Copy link
Copy Markdown
Member

Overview

There are a couple annoying complications at the moment:

  • Creating an org also creates a row in the user table, since that's how we track project and code ownership
  • Users must have an email
  • It's weird to require a unique email when creating an org

Solution: Allow a null email, but only for orgs

Implementation notes

  • Remove the NOT NULL constraint on emails
  • Add an is_org column to the users table
  • Add a check constraint so EITHER an email is required, or the row is an org user.

@ChrisPenner ChrisPenner merged commit e91d882 into main May 5, 2025
4 checks passed
@ChrisPenner ChrisPenner deleted the cp/org-emails branch May 5, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant