diff options
| author | Xinhui | 2017-09-05 16:08:37 +0200 |
|---|---|---|
| committer | Xinhui | 2017-09-05 16:46:19 +0200 |
| commit | 26affe0da7bb7987e54c862e40acd4db8641d162 (patch) | |
| tree | 2ba948d850c0a403fdf4351372b79edca04f29b9 /db | |
| parent | 92703917b31cbaf7f4e5e1bafd009eee2d26c6a1 (diff) | |
| download | chouette-core-26affe0da7bb7987e54c862e40acd4db8641d162.tar.bz2 | |
Model ComplianceCheckBlock
Refs #4387
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20170905135646_create_compliance_check_blocks.rb | 11 | ||||
| -rw-r--r-- | db/schema.rb | 13 |
2 files changed, 23 insertions, 1 deletions
diff --git a/db/migrate/20170905135646_create_compliance_check_blocks.rb b/db/migrate/20170905135646_create_compliance_check_blocks.rb new file mode 100644 index 000000000..c461e656b --- /dev/null +++ b/db/migrate/20170905135646_create_compliance_check_blocks.rb @@ -0,0 +1,11 @@ +class CreateComplianceCheckBlocks < ActiveRecord::Migration + def change + create_table :compliance_check_blocks do |t| + t.string :name + t.hstore :condition_attributes + t.references :compliance_check_set, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index dad05b449..29887979f 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: 20170905130413) do +ActiveRecord::Schema.define(version: 20170905135646) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -145,6 +145,16 @@ ActiveRecord::Schema.define(version: 20170905130413) 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_sets", id: :bigserial, force: :cascade do |t| t.integer "referential_id" t.integer "compliance_control_set_id" @@ -910,6 +920,7 @@ ActiveRecord::Schema.define(version: 20170905130413) 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_sets", "compliance_control_sets" add_foreign_key "compliance_check_sets", "referentials" add_foreign_key "compliance_check_sets", "workbenches" |
