diff options
| author | Teddy Wing | 2017-11-13 11:15:17 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-11-13 11:15:17 +0100 |
| commit | bc0964d3be07943ee3f68978a7a6be142cb12e41 (patch) | |
| tree | 7d8bf80d0bccd285b31a32b90cb7755d6a905b88 | |
| parent | 2569bb6a1b0eb633e3bd34340212c450ca9c6ff8 (diff) | |
| download | chouette-core-bc0964d3be07943ee3f68978a7a6be142cb12e41.tar.bz2 | |
compliance_check_resources: Rename `type` column to `resource_type`
The Java application needs a `resource_type` column to be able to store
the class/object that was validated by the resource's check. Since we
don't need or want Single Table Inheritance on this table, rename the
existing `type` field to `resource_type`.
Refs #4953
| -rw-r--r-- | db/migrate/20171113101005_change_type_to_resource_type_from_compliance_check_resources.rb | 5 | ||||
| -rw-r--r-- | db/schema.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/db/migrate/20171113101005_change_type_to_resource_type_from_compliance_check_resources.rb b/db/migrate/20171113101005_change_type_to_resource_type_from_compliance_check_resources.rb new file mode 100644 index 000000000..6d1aaa883 --- /dev/null +++ b/db/migrate/20171113101005_change_type_to_resource_type_from_compliance_check_resources.rb @@ -0,0 +1,5 @@ +class ChangeTypeToResourceTypeFromComplianceCheckResources < ActiveRecord::Migration + def change + rename_column :compliance_check_resources, :type, :resource_type + end +end diff --git a/db/schema.rb b/db/schema.rb index cab058eb7..b6dad4ca7 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: 20171110130416) do +ActiveRecord::Schema.define(version: 20171113101005) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -174,7 +174,7 @@ ActiveRecord::Schema.define(version: 20171110130416) do create_table "compliance_check_resources", id: :bigserial, force: :cascade do |t| t.string "status" t.string "name" - t.string "type" + t.string "resource_type" t.string "reference" t.hstore "metrics" t.datetime "created_at", null: false |
