aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorMichel Etienne2012-11-06 18:53:29 +0100
committerMichel Etienne2012-11-06 18:53:29 +0100
commit48842ac1197560b1b7f597e3e1be7c4d93f8d098 (patch)
treedfeee03bf8ae1fb2b4a665b61c95bfe33056105f /db
parentc1c4d3fbc9231fe6b1bdd325faced49f33cdf1b2 (diff)
downloadchouette-core-48842ac1197560b1b7f597e3e1be7c4d93f8d098.tar.bz2
add access_points and access_links managment
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20121025112852_add_fields_to_access_points.ninoxe_engine.rb13
-rw-r--r--db/schema.rb72
2 files changed, 47 insertions, 38 deletions
diff --git a/db/migrate/20121025112852_add_fields_to_access_points.ninoxe_engine.rb b/db/migrate/20121025112852_add_fields_to_access_points.ninoxe_engine.rb
new file mode 100644
index 000000000..ac692647d
--- /dev/null
+++ b/db/migrate/20121025112852_add_fields_to_access_points.ninoxe_engine.rb
@@ -0,0 +1,13 @@
+# This migration comes from ninoxe_engine (originally 20121024072219)
+class AddFieldsToAccessPoints < ActiveRecord::Migration
+ def change
+ remove_column "access_points", "mobility_restricted_suitability"
+ remove_column "access_points", "stairs_availability"
+ add_column "access_points", "mobility_restricted_suitability", "boolean"
+ add_column "access_points", "stairs_availability", "boolean"
+ rename_column "access_points", "type","access_type"
+ change_column "access_points", "openning_time","time"
+ change_column "access_points", "closing_time","time"
+ add_column "access_points", "stop_area_id", "integer", {:limit => 8}
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 20c522d1d..febc71b99 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120926144619) do
+ActiveRecord::Schema.define(:version => 20121025112852) do
create_table "access_links", :force => true do |t|
t.integer "access_point_id", :limit => 8
@@ -43,21 +43,22 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.string "creator_id"
t.string "name"
t.string "comment"
- t.decimal "longitude", :precision => 19, :scale => 16
- t.decimal "latitude", :precision => 19, :scale => 16
+ t.decimal "longitude", :precision => 19, :scale => 16
+ t.decimal "latitude", :precision => 19, :scale => 16
t.string "long_lat_type"
- t.decimal "x", :precision => 19, :scale => 2
- t.decimal "y", :precision => 19, :scale => 2
+ t.decimal "x", :precision => 19, :scale => 2
+ t.decimal "y", :precision => 19, :scale => 2
t.string "projection_type"
t.string "country_code"
t.string "street_name"
t.string "contained_in"
- t.datetime "openning_time"
- t.datetime "closing_time"
- t.string "type"
+ t.time "openning_time"
+ t.time "closing_time"
+ t.string "access_type"
t.boolean "lift_availability"
- t.datetime "mobility_restricted_suitability"
- t.datetime "stairs_availability"
+ t.boolean "mobility_restricted_suitability"
+ t.boolean "stairs_availability"
+ t.integer "stop_area_id", :limit => 8
end
add_index "access_points", ["objectid"], :name => "access_points_objectid_key", :unique => true
@@ -176,14 +177,16 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.integer "choice_code"
end
+ add_index "facilities_features", ["facility_id"], :name => "idx_facility_id"
+
create_table "file_validation_log_messages", :force => true do |t|
t.integer "file_validation_id"
t.string "key"
t.string "arguments", :limit => 1000
t.integer "position"
t.string "severity"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
add_index "file_validation_log_messages", ["file_validation_id"], :name => "index_file_validation_log_messages_on_file_validation_id"
@@ -193,21 +196,11 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.string "options", :limit => 2000
t.string "file_name"
t.string "file_type"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.integer "organisation_id"
end
- create_table "geometry_columns", :id => false, :force => true do |t|
- t.string "f_table_catalog", :limit => 256, :null => false
- t.string "f_table_schema", :limit => 256, :null => false
- t.string "f_table_name", :limit => 256, :null => false
- t.string "f_geometry_column", :limit => 256, :null => false
- t.integer "coord_dimension", :null => false
- t.integer "srid", :null => false
- t.string "type", :limit => 30, :null => false
- end
-
create_table "group_of_lines", :force => true do |t|
t.string "objectid", :null => false
t.integer "object_version"
@@ -220,10 +213,13 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
add_index "group_of_lines", ["objectid"], :name => "group_of_lines_objectid_key", :unique => true
create_table "group_of_lines_lines", :id => false, :force => true do |t|
- t.integer "group_of_line_id", :limit => 8
- t.integer "line_id", :limit => 8
+ t.integer "group_of_line_id", :limit => 8, :null => false
+ t.integer "line_id", :limit => 8, :null => false
end
+ add_index "group_of_lines_lines", ["group_of_line_id"], :name => "idx_grli_gr"
+ add_index "group_of_lines_lines", ["line_id"], :name => "idx_grli_li"
+
create_table "import_log_messages", :force => true do |t|
t.integer "import_id"
t.string "key"
@@ -265,10 +261,11 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
add_index "journey_patterns", ["objectid"], :name => "journey_patterns_objectid_key", :unique => true
create_table "journey_patterns_stop_points", :id => false, :force => true do |t|
- t.integer "journey_pattern_id", :limit => 8
- t.integer "stop_point_id", :limit => 8
+ t.integer "journey_pattern_id", :limit => 8, :null => false
+ t.integer "stop_point_id", :limit => 8, :null => false
end
+ add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "idx_jpsp_jpid"
add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "index_journey_pattern_id_on_journey_patterns_stop_points"
create_table "lines", :force => true do |t|
@@ -337,8 +334,8 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.datetime "updated_at"
t.string "prefix"
t.string "projection_type"
+ t.string "bounding_box", :limit => nil
t.string "time_zone"
- t.string "the_geom"
t.string "bounds"
t.integer "organisation_id"
end
@@ -365,13 +362,8 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.integer "line_id", :limit => 8
end
- create_table "spatial_ref_sys", :id => false, :force => true do |t|
- t.integer "srid", :null => false
- t.string "auth_name", :limit => 256
- t.integer "auth_srid"
- t.string "srtext", :limit => 2048
- t.string "proj4text", :limit => 2048
- end
+ add_index "routing_constraints_lines", ["line_id"], :name => "idx_rcli_li"
+ add_index "routing_constraints_lines", ["stop_area_id"], :name => "idx_rcli_st"
create_table "stop_areas", :force => true do |t|
t.integer "parent_id", :limit => 8
@@ -459,8 +451,8 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
add_index "time_tables", ["objectid"], :name => "time_tables_objectid_key", :unique => true
create_table "time_tables_vehicle_journeys", :id => false, :force => true do |t|
- t.integer "time_table_id", :limit => 8
- t.integer "vehicle_journey_id", :limit => 8
+ t.integer "time_table_id", :limit => 8, :null => false
+ t.integer "vehicle_journey_id", :limit => 8, :null => false
end
add_index "time_tables_vehicle_journeys", ["time_table_id"], :name => "index_time_tables_vehicle_journeys_on_time_table_id"
@@ -510,8 +502,12 @@ ActiveRecord::Schema.define(:version => 20120926144619) do
t.time "waiting_time"
t.time "elapse_duration"
t.time "headway_frequency"
+ t.integer "position", :limit => 8
+ t.boolean "is_departure", :default => false
+ t.boolean "is_arrival", :default => false
end
+ add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_point_id"
add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_pointid"
add_index "vehicle_journey_at_stops", ["vehicle_journey_id"], :name => "index_vehicle_journey_at_stops_on_vehicle_journey_id"