diff options
| -rw-r--r-- | db/migrate/20171218174509_change_compliance_control_compliance_check_control_attributes_format_from_hstore_to_json.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 6 | 
2 files changed, 13 insertions, 3 deletions
| diff --git a/db/migrate/20171218174509_change_compliance_control_compliance_check_control_attributes_format_from_hstore_to_json.rb b/db/migrate/20171218174509_change_compliance_control_compliance_check_control_attributes_format_from_hstore_to_json.rb new file mode 100644 index 000000000..ec5a95ec9 --- /dev/null +++ b/db/migrate/20171218174509_change_compliance_control_compliance_check_control_attributes_format_from_hstore_to_json.rb @@ -0,0 +1,10 @@ +class ChangeComplianceControlComplianceCheckControlAttributesFormatFromHstoreToJson < ActiveRecord::Migration +  def change +    change_column :compliance_controls, +      :control_attributes, +      'json USING hstore_to_json(control_attributes)' +    change_column :compliance_checks, +      :control_attributes, +      'json USING hstore_to_json(control_attributes)' +  end +end diff --git a/db/schema.rb b/db/schema.rb index f2642f8fc..50ee0dcf4 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: 20171214130636) do +ActiveRecord::Schema.define(version: 20171218174509) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" @@ -208,7 +208,7 @@ ActiveRecord::Schema.define(version: 20171214130636) do      t.integer  "compliance_check_set_id",   limit: 8      t.integer  "compliance_check_block_id", limit: 8      t.string   "type" -    t.hstore   "control_attributes" +    t.json     "control_attributes"      t.string   "name"      t.string   "code"      t.string   "criticity" @@ -243,7 +243,7 @@ ActiveRecord::Schema.define(version: 20171214130636) do    create_table "compliance_controls", id: :bigserial, force: :cascade do |t|      t.integer  "compliance_control_set_id",   limit: 8      t.string   "type" -    t.hstore   "control_attributes" +    t.json     "control_attributes"      t.string   "name"      t.string   "code"      t.string   "criticity" | 
