Skip to content

fix: Add default created_by in templates and not null constraint - #2290

Merged
AbhineetJain merged 1 commit into
mainfrom
abhineetjain/not-null-template-created-by
Jun 13, 2022
Merged

AbhineetJain merged 1 commit into
mainfrom
abhineetjain/not-null-template-created-by

Conversation

@AbhineetJain

@AbhineetJain AbhineetJain commented Jun 13, 2022 •

Copy link
Copy Markdown
Contributor

This PR populates the created_by field wherever null with the first-created user in the organization and adds a non-nullable constraint.

Subtasks

  • create migration with populating the default value and adding the not null constraint
  • update usages of NullUUID to UUID
  • remove default <unknown> behavior in frontend for unknown creators.

Fixes #2283

@AbhineetJain
AbhineetJain requested a review from a team as a code owner June 13, 2022 17:08
@AbhineetJain
AbhineetJain requested a review from a team June 13, 2022 17:09

@BrunoQuaresma BrunoQuaresma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Emyrk

Emyrk commented Jun 13, 2022

Copy link
Copy Markdown
Member

❤️ I wanted this

@Emyrk Emyrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more nulls! 👍

@AbhineetJain
AbhineetJain force-pushed the abhineetjain/not-null-template-created-by branch from 4ff9669 to f8668bc Compare June 13, 2022 17:14
@AbhineetJain
AbhineetJain enabled auto-merge (squash) June 13, 2022 17:17
@AbhineetJain
AbhineetJain merged commit a91482c into main Jun 13, 2022
@AbhineetJain
AbhineetJain deleted the abhineetjain/not-null-template-created-by branch June 13, 2022 17:25
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.

Make created_by field in templates table not null

5 participants