diff options
Diffstat (limited to 'db/schema.rb')
| -rw-r--r-- | db/schema.rb | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/db/schema.rb b/db/schema.rb index 98e60c909..9207590b5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -145,6 +145,107 @@ ActiveRecord::Schema.define(version: 20170907082913) do add_index "companies", ["objectid"], name: "companies_objectid_key", unique: true, using: :btree add_index "companies", ["registration_number"], name: "companies_registration_number_key", using: :btree + create_table "compliance_check_blocks", id: :bigserial, force: :cascade do |t| + t.string "name" + t.hstore "condition_attributes" + t.integer "compliance_check_set_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_check_blocks", ["compliance_check_set_id"], name: "index_compliance_check_blocks_on_compliance_check_set_id", using: :btree + + create_table "compliance_check_resources", id: :bigserial, force: :cascade do |t| + t.string "status" + t.string "name" + t.string "type" + t.string "reference" + t.hstore "metrics" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "compliance_check_results", id: :bigserial, force: :cascade do |t| + t.integer "compliance_check_id" + t.integer "compliance_check_resource_id" + t.string "message_key" + t.hstore "message_attributes" + t.hstore "resource_attributes" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_check_results", ["compliance_check_id"], name: "index_compliance_check_results_on_compliance_check_id", using: :btree + add_index "compliance_check_results", ["compliance_check_resource_id"], name: "index_compliance_check_results_on_compliance_check_resource_id", using: :btree + + create_table "compliance_check_sets", id: :bigserial, force: :cascade do |t| + t.integer "referential_id" + t.integer "compliance_control_set_id" + t.integer "workbench_id" + t.string "creator" + t.string "status" + t.integer "parent_id" + t.string "parent_type" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_check_sets", ["compliance_control_set_id"], name: "index_compliance_check_sets_on_compliance_control_set_id", using: :btree + add_index "compliance_check_sets", ["parent_type", "parent_id"], name: "index_compliance_check_sets_on_parent_type_and_parent_id", using: :btree + add_index "compliance_check_sets", ["referential_id"], name: "index_compliance_check_sets_on_referential_id", using: :btree + add_index "compliance_check_sets", ["workbench_id"], name: "index_compliance_check_sets_on_workbench_id", using: :btree + + create_table "compliance_checks", id: :bigserial, force: :cascade do |t| + t.integer "compliance_check_set_id" + t.integer "compliance_check_block_id" + t.string "type" + t.json "control_attributes" + t.string "name" + t.string "code" + t.integer "criticity" + t.text "comment" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_checks", ["compliance_check_block_id"], name: "index_compliance_checks_on_compliance_check_block_id", using: :btree + add_index "compliance_checks", ["compliance_check_set_id"], name: "index_compliance_checks_on_compliance_check_set_id", using: :btree + + create_table "compliance_control_blocks", id: :bigserial, force: :cascade do |t| + t.string "name" + t.hstore "condition_attributes" + t.integer "compliance_control_set_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_control_blocks", ["compliance_control_set_id"], name: "index_compliance_control_blocks_on_compliance_control_set_id", using: :btree + + create_table "compliance_control_sets", id: :bigserial, force: :cascade do |t| + t.string "name" + t.integer "organisation_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_control_sets", ["organisation_id"], name: "index_compliance_control_sets_on_organisation_id", using: :btree + + create_table "compliance_controls", id: :bigserial, force: :cascade do |t| + t.integer "compliance_control_set_id" + t.integer "compliance_control_block_id" + t.string "type" + t.json "control_attributes" + t.string "name" + t.string "code" + t.integer "criticity" + t.text "comment" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "compliance_controls", ["compliance_control_block_id"], name: "index_compliance_controls_on_compliance_control_block_id", using: :btree + add_index "compliance_controls", ["compliance_control_set_id"], name: "index_compliance_controls_on_compliance_control_set_id", using: :btree + create_table "connection_links", id: :bigserial, force: :cascade do |t| t.integer "departure_id", limit: 8 t.integer "arrival_id", limit: 8 @@ -864,6 +965,18 @@ ActiveRecord::Schema.define(version: 20170907082913) do add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey" add_foreign_key "api_keys", "organisations" + add_foreign_key "compliance_check_blocks", "compliance_check_sets" + add_foreign_key "compliance_check_results", "compliance_check_resources" + add_foreign_key "compliance_check_results", "compliance_checks" + add_foreign_key "compliance_check_sets", "compliance_control_sets" + add_foreign_key "compliance_check_sets", "referentials" + add_foreign_key "compliance_check_sets", "workbenches" + add_foreign_key "compliance_checks", "compliance_check_blocks" + add_foreign_key "compliance_checks", "compliance_check_sets" + add_foreign_key "compliance_control_blocks", "compliance_control_sets" + add_foreign_key "compliance_control_sets", "organisations" + add_foreign_key "compliance_controls", "compliance_control_blocks" + add_foreign_key "compliance_controls", "compliance_control_sets" add_foreign_key "group_of_lines_lines", "group_of_lines", name: "groupofline_group_fkey", on_delete: :cascade add_foreign_key "journey_frequencies", "timebands", on_delete: :nullify add_foreign_key "journey_frequencies", "vehicle_journeys", on_delete: :nullify |
