Skip to content

Update the jobs table to add real reference to users table

Pavit Kaur requested to merge PavitKaur05/debci:requestor-id-in-jobs into master
  • Added migration file to add requestor_id field containing the id of user requesting the job, making the field foreign key for users and deleting the existing string requestor field.
  • Added association belongs_to in job.rb for user with validation of presence of user and has_many in user.rb for jobs.
  • Updated other files to use requestor association with user object
  • Updated tests in spec/debci files.
  • Added tests in spec/debci/job_spec.rb to check null value constraint data integrity constraint with foreign key validation.
Edited by Pavit Kaur

Merge request reports

Loading