debian-mirror-gitlab/db/migrate/20230123095022_create_scan_result_policies.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
613 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# frozen_string_literal: true
class CreateScanResultPolicies < Gitlab::Database::Migration[2.1]
INDEX_NAME = "index_scan_result_policies_on_policy_configuration_id"
def change
create_table :scan_result_policies do |t|
t.references :security_orchestration_policy_configuration,
null: false,
foreign_key: { on_delete: :cascade },
index: { name: INDEX_NAME }
t.timestamps_with_timezone null: false
t.integer :orchestration_policy_idx, limit: 2, null: false
t.text :license_states, array: true, default: []
end
end
end