title: Delete from table without primary key in Sequel
body: <p>I am trying to delete a row I just added in a test (minitest) in its <code>teardown</code> method &amp; it fails with the message that the table doesn't have a primary key. Following is its migration:</p>
  
  <pre><code>Sequel.migration do
    up do
      create_table :hobbies_users do
        Integer :user_id
        Integer :hobby_id
  
        unique [:user_id, :hobby_id]
      end
    end
  
    down do
      drop_table :hobbies_users
    end
  end
  </code></pre>
  
  <p>How can I do it? Is it bad practice not to have a primary key?</p>
  
  <p>Test code, where I found the problem:</p>
  
  <pre><code>require_relative '../../test_helper.rb'
  require 'api/models/users_hobbies'
  
  class UsersHobbiesTest &lt; Minitest::Test
    def setup
      @uh = UsersHobbies
        .new(user_id: User.all.sample.id, hobby_id: Hobby.last.id * 10)
        .save
    end
  
    def test_accessors
      assert_kind_of User, @uh.user
    end
  
    def teardown
      @uh.destroy
    end
  end
  </code></pre>