class CreateApplyJobs < ActiveRecord::Migration[5.2]
  def change
    create_table :apply_jobs do |t|
      t.references :user, index: true
      t.references :job, index: true
      t.datetime :viewed_at

      t.timestamps
    end
    add_column :jobs, :apply_jobs_count, :integer, default: 0
  end
end
