diff options
| author | vlatka pavisic | 2016-12-12 15:49:52 +0100 |
|---|---|---|
| committer | vlatka pavisic | 2016-12-12 15:49:58 +0100 |
| commit | 2d4e6b45b0295e8c01deaebb04f8be009a7f9d87 (patch) | |
| tree | efb5139d08a29e9e0c9017b35d34ca8aa611f34d /db | |
| parent | 73ab4dfc33dcf6b32198ae902fea3f8504821dea (diff) | |
| download | chouette-core-2d4e6b45b0295e8c01deaebb04f8be009a7f9d87.tar.bz2 | |
Refs #1955 : RoutingConstraintZone
Diffstat (limited to 'db')
4 files changed, 38 insertions, 1 deletions
diff --git a/db/migrate/20161208112130_create_routing_constraint_zones.rb b/db/migrate/20161208112130_create_routing_constraint_zones.rb new file mode 100644 index 000000000..0fa1ef1ae --- /dev/null +++ b/db/migrate/20161208112130_create_routing_constraint_zones.rb @@ -0,0 +1,11 @@ +class CreateRoutingConstraintZones < ActiveRecord::Migration + def change + create_table :routing_constraint_zones do |t| + t.string :name + t.integer :stop_area_ids, array: true + t.belongs_to :line, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20161208114057_add_trident_fields_to_routing_constraint_zone.rb b/db/migrate/20161208114057_add_trident_fields_to_routing_constraint_zone.rb new file mode 100644 index 000000000..afe9379c0 --- /dev/null +++ b/db/migrate/20161208114057_add_trident_fields_to_routing_constraint_zone.rb @@ -0,0 +1,6 @@ +class AddTridentFieldsToRoutingConstraintZone < ActiveRecord::Migration + def change + add_column :routing_constraint_zones, :objectid, :string, null: false + add_column :routing_constraint_zones, :object_version, :integer + end +end diff --git a/db/migrate/20161208120132_add_other_trident_fields_to_routing_constraint_zone.rb b/db/migrate/20161208120132_add_other_trident_fields_to_routing_constraint_zone.rb new file mode 100644 index 000000000..89ed46a97 --- /dev/null +++ b/db/migrate/20161208120132_add_other_trident_fields_to_routing_constraint_zone.rb @@ -0,0 +1,6 @@ +class AddOtherTridentFieldsToRoutingConstraintZone < ActiveRecord::Migration + def change + add_column :routing_constraint_zones, :creation_time, :datetime + add_column :routing_constraint_zones, :creator_id, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index e97ba8e52..0277cae91 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: 20161118101544) do +ActiveRecord::Schema.define(version: 20161208120132) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -466,6 +466,20 @@ ActiveRecord::Schema.define(version: 20161118101544) do add_index "routes", ["objectid"], :name => "routes_objectid_key", :unique => true + create_table "routing_constraint_zones", force: true do |t| + t.string "name" + t.integer "stop_area_ids", array: true + t.integer "line_id" + t.datetime "created_at" + t.datetime "updated_at" + t.string "objectid", null: false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + end + + add_index "routing_constraint_zones", ["line_id"], :name => "index_routing_constraint_zones_on_line_id" + create_table "routing_constraints_lines", id: false, force: true do |t| t.integer "stop_area_id", limit: 8 t.integer "line_id", limit: 8 |
