title: Defining multiple foreign keys in one table to many tables
body: <p>I have 3 models:</p>
  
  <p><strong>Post</strong>:</p>
  
  <ul>
  <li>id</li>
  <li>title</li>
  <li>body</li>
  </ul>
  
  <p><strong>Photo</strong>:</p>
  
  <ul>
  <li>id</li>
  <li>filepath</li>
  </ul>
  
  <p><strong>Comment</strong>:</p>
  
  <ul>
  <li>id</li>
  <li>post_id</li>
  <li>body</li>
  </ul>
  
  <p>and corresponding tables in DB. Now, if I want to have comments only for my posts I can simply add following foreign key: <code>ALTER TABLE comment ADD FOREIGN KEY (post_id) REFERENCES post (id)</code>. But I want to have comments for other models (photo, profile, video, etc) and keep all comments in <strong>one</strong> table. How can I define foreign keys (i definitely need FKs for ORM) in such case?</p>