Skip to content

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

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

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

AbhineetJain
Copy link
Contributor

@AbhineetJain AbhineetJain commented Jun 13, 2022

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
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

LGTM.

@Emyrk
Copy link
Member

Emyrk commented Jun 13, 2022

❤️ I wanted this

Copy link
Member

@Emyrk Emyrk left a comment

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