diff options
| author | RobertDober | 2017-04-06 19:00:24 +0200 |
|---|---|---|
| committer | RobertDober | 2017-04-07 07:07:26 +0200 |
| commit | dc515f5eda324baae5a9583f1be433ac7dcd2915 (patch) | |
| tree | 850f26f59c5f9420bd3a1ed32179c6e5e20676e2 /db | |
| parent | 2a682f54f583a985809ba9ba1e33a1608f9f63b0 (diff) | |
| parent | 7ac766fb016108429730248f1a8bfd5065e8c31b (diff) | |
| download | chouette-core-dc515f5eda324baae5a9583f1be433ac7dcd2915.tar.bz2 | |
db:schema:dump
Diffstat (limited to 'db')
6 files changed, 21 insertions, 9 deletions
diff --git a/db/migrate/20170317114614_remove_stop_points_route_fk.rb b/db/migrate/20170317114614_remove_stop_points_route_fk.rb index ff191445a..b02516328 100644 --- a/db/migrate/20170317114614_remove_stop_points_route_fk.rb +++ b/db/migrate/20170317114614_remove_stop_points_route_fk.rb @@ -1,6 +1,6 @@ class RemoveStopPointsRouteFk < ActiveRecord::Migration def change - if foreign_keys(:stop_points).include?(:stoppoint_route_fkey) + if foreign_keys(:stop_points).any? { |f| f.options[:name] = :stoppoint_route_fkey } remove_foreign_key :stop_points, name: :stoppoint_route_fkey end end diff --git a/db/migrate/20170321141620_add_type_to_imports.rb b/db/migrate/20170321141620_add_type_to_imports.rb index cba497ad1..fc4619969 100644 --- a/db/migrate/20170321141620_add_type_to_imports.rb +++ b/db/migrate/20170321141620_add_type_to_imports.rb @@ -1,7 +1,7 @@ class AddTypeToImports < ActiveRecord::Migration def up add_column :imports, :type, :string - execute "update imports set type = 'netex_import' where type is null" + execute "update imports set type = 'NetexImport' where type is null" end def down diff --git a/db/migrate/20170322075010_delete_translations.rb b/db/migrate/20170322075010_delete_translations.rb index 76976f6b8..7005ffcaf 100644 --- a/db/migrate/20170322075010_delete_translations.rb +++ b/db/migrate/20170322075010_delete_translations.rb @@ -1,5 +1,7 @@ class DeleteTranslations < ActiveRecord::Migration def change - drop_table :translations + if table_exists?('translations') + drop_table :translations + end end end diff --git a/db/migrate/20170403155202_add_departure_arrival_day_offsets_to_vjas.rb b/db/migrate/20170403155202_add_departure_arrival_day_offsets_to_vjas.rb new file mode 100644 index 000000000..ac580b990 --- /dev/null +++ b/db/migrate/20170403155202_add_departure_arrival_day_offsets_to_vjas.rb @@ -0,0 +1,6 @@ +class AddDepartureArrivalDayOffsetsToVjas < ActiveRecord::Migration + def change + add_column :vehicle_journey_at_stops, :departure_day_offset, :integer + add_column :vehicle_journey_at_stops, :arrival_day_offset, :integer + end +end diff --git a/db/migrate/20170404122930_add_route_rm_line_from_routing_constraint_zone.rb b/db/migrate/20170404122930_add_route_rm_line_from_routing_constraint_zone.rb new file mode 100644 index 000000000..f53c0b503 --- /dev/null +++ b/db/migrate/20170404122930_add_route_rm_line_from_routing_constraint_zone.rb @@ -0,0 +1,6 @@ +class AddRouteRmLineFromRoutingConstraintZone < ActiveRecord::Migration + def change + remove_column :routing_constraint_zones, :line_id, :bigint + add_column :routing_constraint_zones, :route_id, :bigint + end +end diff --git a/db/schema.rb b/db/schema.rb index a6b237542..c49f52067 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: 20170322075010) do +ActiveRecord::Schema.define(version: 20170404122930) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -543,16 +543,14 @@ ActiveRecord::Schema.define(version: 20170322075010) do create_table "routing_constraint_zones", force: true do |t| t.string "name" t.integer "stop_area_ids", array: true - t.integer "line_id", limit: 8 t.datetime "created_at" t.datetime "updated_at" t.string "objectid", null: false t.integer "object_version", limit: 8 t.string "creator_id" + t.integer "route_id", limit: 8 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 @@ -781,6 +779,8 @@ ActiveRecord::Schema.define(version: 20170322075010) do t.time "departure_time" t.string "for_boarding" t.string "for_alighting" + t.integer "departure_day_offset" + t.integer "arrival_day_offset" end add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_pointid" @@ -849,8 +849,6 @@ ActiveRecord::Schema.define(version: 20170322075010) do add_foreign_key "stop_areas_stop_areas", "stop_areas", name: "stoparea_child_fkey", column: "child_id", dependent: :delete add_foreign_key "stop_areas_stop_areas", "stop_areas", name: "stoparea_parent_fkey", column: "parent_id", dependent: :delete - add_foreign_key "stop_points", "routes", name: "stoppoint_route_fkey", dependent: :delete - add_foreign_key "time_table_dates", "time_tables", name: "tm_date_fkey", dependent: :delete add_foreign_key "time_table_periods", "time_tables", name: "tm_period_fkey", dependent: :delete |
