diff options
| author | Guillaume | 2017-09-19 11:33:25 +0200 | 
|---|---|---|
| committer | Guillaume | 2017-09-19 11:33:25 +0200 | 
| commit | f0e348e360a5c5b940356b95e75905f9794d2332 (patch) | |
| tree | 8d3de103af3802634cb4f1de0f3b86fba07f5a02 /db | |
| parent | 47bc1f0ef1b4c1ba0db0a9e6e75f765dd2c5d88d (diff) | |
| parent | 1defcfa262845b2acd75ceac2d200f11ddf3a54e (diff) | |
| download | chouette-core-f0e348e360a5c5b940356b95e75905f9794d2332.tar.bz2 | |
Merge branch 'master' into 4466-compliance_control_sets4466-compliance_control_sets
Diffstat (limited to 'db')
3 files changed, 27 insertions, 17 deletions
diff --git a/db/migrate/20170915100935_change_crticity_type_for_compliance_control.rb b/db/migrate/20170915100935_change_crticity_type_for_compliance_control.rb new file mode 100644 index 000000000..f3e7e7339 --- /dev/null +++ b/db/migrate/20170915100935_change_crticity_type_for_compliance_control.rb @@ -0,0 +1,5 @@ +class ChangeCrticityTypeForComplianceControl < ActiveRecord::Migration +  def change +    change_column :compliance_controls, :criticity, :string +  end +end diff --git a/db/migrate/20170918103913_alter_table_compliance_check_result_to_compliance_check_message.rb b/db/migrate/20170918103913_alter_table_compliance_check_result_to_compliance_check_message.rb new file mode 100644 index 000000000..c0dc6225a --- /dev/null +++ b/db/migrate/20170918103913_alter_table_compliance_check_result_to_compliance_check_message.rb @@ -0,0 +1,5 @@ +class AlterTableComplianceCheckResultToComplianceCheckMessage < ActiveRecord::Migration +  def change +    rename_table :compliance_check_results, :compliance_check_messages +  end +end diff --git a/db/schema.rb b/db/schema.rb index 39162b447..2b62fa7f1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@  #  # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170913074922) do +ActiveRecord::Schema.define(version: 20170918103913) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" @@ -155,17 +155,7 @@ ActiveRecord::Schema.define(version: 20170913074922) do    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| +  create_table "compliance_check_messages", id: :bigserial, force: :cascade do |t|      t.integer  "compliance_check_id"      t.integer  "compliance_check_resource_id"      t.string   "message_key" @@ -175,8 +165,18 @@ ActiveRecord::Schema.define(version: 20170913074922) do      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 +  add_index "compliance_check_messages", ["compliance_check_id"], name: "index_compliance_check_messages_on_compliance_check_id", using: :btree +  add_index "compliance_check_messages", ["compliance_check_resource_id"], name: "index_compliance_check_messages_on_compliance_check_resource_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_sets", id: :bigserial, force: :cascade do |t|      t.integer  "referential_id" @@ -237,7 +237,7 @@ ActiveRecord::Schema.define(version: 20170913074922) do      t.json     "control_attributes"      t.string   "name"      t.string   "code" -    t.integer  "criticity" +    t.string   "criticity"      t.text     "comment"      t.datetime "created_at",                  null: false      t.datetime "updated_at",                  null: false @@ -966,8 +966,8 @@ ActiveRecord::Schema.define(version: 20170913074922) 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_messages", "compliance_check_resources" +  add_foreign_key "compliance_check_messages", "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"  | 
