Skip to content
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

Add database constraints for users table #595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Freika
Copy link
Owner

@Freika Freika commented Dec 26, 2024

No description provided.

@Freika Freika requested a review from Copilot December 26, 2024 20:34

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • Gemfile: Evaluated as low risk
Comments suppressed due to low confidence (3)

db/migrate/20241226202204_add_database_users_constraints.rb:5

  • [nitpick] The constraint name 'users_email_null' is ambiguous. It should be renamed to 'users_email_not_null' for better clarity.
add_check_constraint :users, 'email IS NOT NULL', name: 'users_email_null', validate: false

db/migrate/20241226202204_add_database_users_constraints.rb:6

  • [nitpick] The constraint name 'users_admin_null' is ambiguous. It should be renamed to 'users_admin_not_null' for better clarity.
add_check_constraint :users, 'admin IS NOT NULL', name: 'users_admin_null', validate: false

app/models/user.rb:24

  • Ensure that the admin attribute's default value and behavior are covered by tests.
attribute :admin, :boolean, default: false
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