diff options
| author | Xinhui | 2017-09-05 12:25:48 +0200 |
|---|---|---|
| committer | Xinhui | 2017-09-05 12:26:33 +0200 |
| commit | 6b0b5be57f3c018f3ed19ddefb20d7c528d7ee3d (patch) | |
| tree | b147def76bbfcab1238c996d22555201456d82b9 /db | |
| parent | 70e8e93b0ebf4596c0ffd64620415db2450f4595 (diff) | |
| download | chouette-core-6b0b5be57f3c018f3ed19ddefb20d7c528d7ee3d.tar.bz2 | |
Model ComplianceControlSet
Refs #4383
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20170905101656_create_compliance_control_sets.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 14 |
2 files changed, 22 insertions, 2 deletions
diff --git a/db/migrate/20170905101656_create_compliance_control_sets.rb b/db/migrate/20170905101656_create_compliance_control_sets.rb new file mode 100644 index 000000000..d074267cd --- /dev/null +++ b/db/migrate/20170905101656_create_compliance_control_sets.rb @@ -0,0 +1,10 @@ +class CreateComplianceControlSets < ActiveRecord::Migration + def change + create_table :compliance_control_sets do |t| + t.string :name + t.references :organisation, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index d1bd3bc2b..bbbaf935e 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: 20170901132253) do +ActiveRecord::Schema.define(version: 20170905101656) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -145,6 +145,15 @@ ActiveRecord::Schema.define(version: 20170901132253) 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_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 "connection_links", id: :bigserial, force: :cascade do |t| t.integer "departure_id", limit: 8 t.integer "arrival_id", limit: 8 @@ -292,9 +301,9 @@ ActiveRecord::Schema.define(version: 20170901132253) do t.string "type" t.integer "parent_id", limit: 8 t.string "parent_type" + t.datetime "notified_parent_at" t.integer "current_step", default: 0 t.integer "total_steps", default: 0 - t.datetime "notified_parent_at" t.string "creator" end @@ -858,6 +867,7 @@ ActiveRecord::Schema.define(version: 20170901132253) do add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey" add_foreign_key "api_keys", "organisations" + add_foreign_key "compliance_control_sets", "organisations" 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 |
