```ruby
Sequel.migration do
  change do
    create_table :pending_jobs do
      column :query_id, :text, primary_key: true
    end
  end
end
```

Fix missing foreign key for pending_jobs
user
```ruby
Sequel.migration do
  change do
    create_table :pending_jobs do
      column :query_id, :text, primary_key: true
      foreign_key [:query_id], :queries
    end
  end
end
```
assistant