Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by Lio

2 days ago

Rails fully supports constraints and encourages you to use them.

You can either execute SQL in your migration or use add_check_constraint.

1 comment

Lio

Reply

panzi  1 day ago

Back when I used Rails the sentiment was: You don't need foreign keys, this is all handled by ActiveRecord.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities