Skip to content

Commit

Permalink
Add Subject to OpenSCAP results
Browse files Browse the repository at this point in the history
Adding subject_id and subject_type fields to openscap_results table
to allow assigning OpenSCAPResult to OpenStack VMs and later also
other inventory.

Existing container_id association is not touched in this PR, but it could
be migrated to polymorphic a subject association in future.
  • Loading branch information
aufi committed Jul 17, 2017
1 parent 75a9709 commit b2fd722
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/migrate/20170717084208_add_subject_to_open_scap_result.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddSubjectToOpenScapResult < ActiveRecord::Migration[5.0]
def change
add_column :openscap_results, :subject_id, :bigint
add_column :openscap_results, :subject_type, :string
end
end
2 changes: 2 additions & 0 deletions db/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5415,6 +5415,8 @@ openscap_results:
- id
- container_image_id
- created_at
- subject_id
- subject_type
openscap_rule_results:
- id
- openscap_result_id
Expand Down

0 comments on commit b2fd722

Please sign in to comment.