diff options
| author | Marc Florisson | 2012-06-01 12:20:36 +0200 |
|---|---|---|
| committer | Marc Florisson | 2012-06-01 12:20:36 +0200 |
| commit | 7fd20ad1409398e06fb1167332c57b4ac4c9aadc (patch) | |
| tree | 51089499a5a24e4c9eb52f8f8f5176f0bb0b1d97 /db | |
| parent | 204460c78933c6d7ae12d4436d9ee8d7e50c8e38 (diff) | |
| download | chouette-core-7fd20ad1409398e06fb1167332c57b4ac4c9aadc.tar.bz2 | |
refactor table and column names
Diffstat (limited to 'db')
23 files changed, 430 insertions, 103 deletions
diff --git a/db/migrate/20120213131553_create_chouette_line.rb b/db/migrate/20120213131553_create_chouette_line.rb index 09a674183..51231a3fc 100644 --- a/db/migrate/20120213131553_create_chouette_line.rb +++ b/db/migrate/20120213131553_create_chouette_line.rb @@ -1,24 +1,24 @@ class CreateChouetteLine < ActiveRecord::Migration def up - create_table "line", :force => true do |t| - t.integer "ptnetworkid", :limit => 8 - t.integer "companyid", :limit => 8 - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + create_table "lines", :force => true do |t| + t.integer "network_id", :limit => 8 + t.integer "company_id", :limit => 8 + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.string "name" t.string "number" - t.string "publishedname" - t.string "transportmodename" - t.string "registrationnumber" + t.string "published_name" + t.string "transport_mode_name" + t.string "registration_number" t.string "comment" - t.boolean "mobilityrestrictedsuitable" - t.integer "userneeds", :limit => 8 + t.boolean "mobility_restricted_suitability" + t.integer "int_user_needs" end - add_index "line", ["objectid"], :name => "line_objectid_key", :unique => true - add_index "line", ["registrationnumber"], :name => "line_registrationnumber_key", :unique => true + add_index "lines", ["objectid"], :name => "lines_objectid_key", :unique => true + add_index "lines", ["registration_number"], :name => "lines_registration_number_key", :unique => true end def down diff --git a/db/migrate/20120214101458_create_chouette_company.rb b/db/migrate/20120214101458_create_chouette_company.rb index 5a15a26e6..c72a73d9b 100644 --- a/db/migrate/20120214101458_create_chouette_company.rb +++ b/db/migrate/20120214101458_create_chouette_company.rb @@ -1,23 +1,23 @@ class CreateChouetteCompany < ActiveRecord::Migration def up - create_table "company", :force => true do |t| - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + create_table "companies", :force => true do |t| + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.string "name" - t.string "shortname" - t.string "organizationalunit" - t.string "operatingdepartmentname" + t.string "short_name" + t.string "organizational_unit" + t.string "operating_department_name" t.string "code" t.string "phone" t.string "fax" t.string "email" - t.string "registrationnumber" + t.string "registration_number" end - add_index "company", ["objectid"], :name => "company_objectid_key", :unique => true - add_index "company", ["registrationnumber"], :name => "company_registrationnumber_key", :unique => true + add_index "companies", ["objectid"], :name => "companies_objectid_key", :unique => true + add_index "companies", ["registration_number"], :name => "companies_registration_number_key", :unique => true end def down diff --git a/db/migrate/20120214101645_create_chouette_ptnetwork.rb b/db/migrate/20120214101645_create_chouette_ptnetwork.rb index 13f294345..45037c31a 100644 --- a/db/migrate/20120214101645_create_chouette_ptnetwork.rb +++ b/db/migrate/20120214101645_create_chouette_ptnetwork.rb @@ -1,21 +1,22 @@ class CreateChouettePtnetwork < ActiveRecord::Migration def up - create_table "ptnetwork", :force => true do |t| - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" - t.date "versiondate" + create_table "networks", :force => true do |t| + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + t.date "version_date" t.string "description" t.string "name" - t.string "registrationnumber" - t.string "sourcename" - t.string "sourceidentifier" + t.string "registration_number" + t.string "source_name" + t.string "source_type" + t.string "source_identifier" t.string "comment" end - add_index "ptnetwork", ["objectid"], :name => "ptnetwork_objectid_key", :unique => true - add_index "ptnetwork", ["registrationnumber"], :name => "ptnetwork_registrationnumber_key", :unique => true + add_index "networks", ["objectid"], :name => "networks_objectid_key", :unique => true + add_index "networks", ["registration_number"], :name => "networks_registration_number_key", :unique => true end def down diff --git a/db/migrate/20120416095045_create_chouette_stop_area.rb b/db/migrate/20120416095045_create_chouette_stop_area.rb index 46ac7f87b..79b8c8260 100644 --- a/db/migrate/20120416095045_create_chouette_stop_area.rb +++ b/db/migrate/20120416095045_create_chouette_stop_area.rb @@ -1,34 +1,33 @@ class CreateChouetteStopArea < ActiveRecord::Migration def up - create_table "stoparea", :force => true do |t| - t.integer "parentid", :limit => 8 - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + create_table "stop_areas", :force => true do |t| + t.integer "parent_id", :limit => 8 + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.string "name" t.string "comment" - t.string "areatype" - t.string "registrationnumber" - t.string "nearesttopicname" - t.integer "farecode" + t.string "area_type" + t.string "registration_number" + t.string "nearest_topic_name" + t.integer "fare_code" t.decimal "longitude", :precision => 19, :scale => 16 t.decimal "latitude", :precision => 19, :scale => 16 - t.string "longlattype" + t.string "long_lat_type" t.decimal "x", :precision => 19, :scale => 2 t.decimal "y", :precision => 19, :scale => 2 - t.string "projectiontype" - t.string "countrycode" - t.string "streetname" - t.integer "modes", :default => 0 + t.string "projection_type" + t.string "country_code" + t.string "street_name" end - add_index "stoparea", ["objectid"], :name => "stoparea_objectid_key", :unique => true - add_index "stoparea", ["parentid"], :name => "index_stoparea_on_parentid" + add_index "stop_areas", ["objectid"], :name => "stop_areas_objectid_key", :unique => true + add_index "stop_areas", ["parent_id"], :name => "index_stop_areas_on_parent_id" end def down - drop_table "stoparea" + drop_table "stop_areas" end end diff --git a/db/migrate/20120416095046_create_time_table.rb b/db/migrate/20120416095046_create_time_table.rb index 3752f0836..da579bb87 100644 --- a/db/migrate/20120416095046_create_time_table.rb +++ b/db/migrate/20120416095046_create_time_table.rb @@ -1,38 +1,38 @@ class CreateTimeTable < ActiveRecord::Migration def up - create_table "timetable", :force => true do |t| + create_table "time_tables", :force => true do |t| t.string "objectid", :null => false - t.integer "objectversion", :default => 1 - t.datetime "creationtime" - t.string "creatorid" + t.integer "object_version", :default => 1 + t.datetime "creation_time" + t.string "creator_id" t.string "version" t.string "comment" - t.integer "intdaytypes", :default => 0 + t.integer "int_day_types", :default => 0 end - add_index "timetable", ["objectid"], :name => "timetable_objectid_key", :unique => true + add_index "time_tables", ["objectid"], :name => "time_tables_objectid_key", :unique => true - create_table "timetable_date", :id => false, :force => true do |t| - t.integer "timetableid", :limit => 8, :null => false + create_table "time_table_dates", :id => false, :force => true do |t| + t.integer "time_table_id", :limit => 8, :null => false t.date "date" t.integer "position", :null => false end - add_index "timetable_date", ["timetableid"], :name => "index_timetable_date_on_timetableid" + add_index "time_table_dates", ["time_table_id"], :name => "index_time_table_dates_on_time_table_id" - create_table "timetable_period", :id => false, :force => true do |t| - t.integer "timetableid", :limit => 8, :null => false - t.date "periodstart" - t.date "periodend" + create_table "time_table_periods", :id => false, :force => true do |t| + t.integer "time_table_id", :limit => 8, :null => false + t.date "period_start" + t.date "period_end" t.integer "position", :null => false end - add_index "timetable_period", ["timetableid"], :name => "index_timetable_period_on_timetableid" + add_index "time_table_periods", ["time_table_id"], :name => "index_time_table_periods_on_time_table_id" end def down - drop_table "timetable_period" - drop_table "timetable_date" - drop_table "timetable" + drop_table "time_table_periods" + drop_table "time_table_dates" + drop_table "time_tables" end end diff --git a/db/migrate/20120425080337_create_chouette_route.rb b/db/migrate/20120425080337_create_chouette_route.rb index 98d0f3c11..21ff43bcc 100644 --- a/db/migrate/20120425080337_create_chouette_route.rb +++ b/db/migrate/20120425080337_create_chouette_route.rb @@ -1,19 +1,20 @@ class CreateChouetteRoute < ActiveRecord::Migration def up - create_table "route", :force => true do |t| - t.integer "lineid", :limit => 8 - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + create_table "routes", :force => true do |t| + t.integer "line_id", :limit => 8 + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.string "name" t.string "comment" - t.integer "oppositerouteid", :limit => 8 - t.string "publishedname" + t.integer "opposite_route_id", :limit => 8 + t.string "published_name" t.string "number" t.string "direction" t.string "wayback" end + add_index "routes", ["objectid"], :name => "routes_objectid_key", :unique => true end def down diff --git a/db/migrate/20120425125542_create_chouette_stop_point.rb b/db/migrate/20120425125542_create_chouette_stop_point.rb index 07e7861a8..ee81d9bfc 100644 --- a/db/migrate/20120425125542_create_chouette_stop_point.rb +++ b/db/migrate/20120425125542_create_chouette_stop_point.rb @@ -1,14 +1,15 @@ class CreateChouetteStopPoint < ActiveRecord::Migration def up - create_table "stoppoint", :force => true do |t| - t.integer "routeid", :limit => 8 - t.integer "stopareaid", :limit => 8 - t.string "objectid" - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + create_table "stop_points", :force => true do |t| + t.integer "route_id", :limit => 8 + t.integer "stop_area_id", :limit => 8 + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.integer "position" end + add_index "stop_points", ["objectid"], :name => "stop_points_objectid_key", :unique => true end def down diff --git a/db/migrate/20120426141032_create_chouette_connection_link.rb b/db/migrate/20120426141032_create_chouette_connection_link.rb index 185c49af2..530c9001a 100644 --- a/db/migrate/20120426141032_create_chouette_connection_link.rb +++ b/db/migrate/20120426141032_create_chouette_connection_link.rb @@ -1,26 +1,26 @@ class CreateChouetteConnectionLink < ActiveRecord::Migration def up - create_table "connectionlink", :force => true do |t| - t.integer "departureid", :limit => 8 - t.integer "arrivalid", :limit => 8 + create_table "connection_links", :force => true do |t| + t.integer "departure_id", :limit => 8 + t.integer "arrival_id", :limit => 8 t.string "objectid", :null => false - t.integer "objectversion" - t.datetime "creationtime" - t.string "creatorid" + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" t.string "name" t.string "comment" - t.decimal "linkdistance", :precision => 19, :scale => 2 - t.string "linktype" - t.time "defaultduration" - t.time "frequenttravellerduration" - t.time "occasionaltravellerduration" - t.time "mobilityrestrictedtravellerduration" - t.boolean "mobilityrestrictedsuitability" - t.boolean "stairsavailability" - t.boolean "liftavailability" - t.integer "intuserneeds" + t.decimal "link_distance", :precision => 19, :scale => 2 + t.string "link_type" + t.time "default_duration" + t.time "frequent_traveller_duration" + t.time "occasional_traveller_duration" + t.time "mobility_restricted_traveller_duration" + t.boolean "mobility_restricted_suitability" + t.boolean "stairs_availability" + t.boolean "lift_availability" + t.integer "int_user_needs" end - add_index "connectionlink", ["objectid"], :name => "connectionlink_objectid_key", :unique => true + add_index "connection_links", ["objectid"], :name => "connection_links_objectid_key", :unique => true end def down diff --git a/db/migrate/20120525092203_create_chouette_journey_pattern.rb b/db/migrate/20120525092203_create_chouette_journey_pattern.rb new file mode 100644 index 000000000..4e45c0a94 --- /dev/null +++ b/db/migrate/20120525092203_create_chouette_journey_pattern.rb @@ -0,0 +1,26 @@ +class CreateChouetteJourneyPattern < ActiveRecord::Migration + def up + create_table :journey_patterns, :force => true do |t| + t.integer "route_id", :limit => 8 + + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "name" + t.string "comment" + t.string "registration_number" + t.string "published_name" + + t.integer "departure_stop_point_id", :limit => 8 + t.integer "arrival_stop_point_id", :limit => 8 + end + add_index "journey_patterns", ["objectid"], :name => "journey_patterns_objectid_key", :unique => true + end + + def down + remove_index "journey_patterns", :name => "journey_patterns_objectid_key" + drop_table :journey_patterns + end +end diff --git a/db/migrate/20120525092204_create_chouette_journey_pattern_stop_point.rb b/db/migrate/20120525092204_create_chouette_journey_pattern_stop_point.rb new file mode 100644 index 000000000..4d6799151 --- /dev/null +++ b/db/migrate/20120525092204_create_chouette_journey_pattern_stop_point.rb @@ -0,0 +1,14 @@ +class CreateChouetteJourneyPatternStopPoint < ActiveRecord::Migration + def up + 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 + end + add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "index_journey_pattern_id_on_journey_patterns_stop_points" + end + + def down + remove_index "journey_patterns_stop_points", :name => "index_journey_pattern_id_on_journey_patterns_stop_points" + drop_table :journey_pattern_stop_points + end +end diff --git a/db/migrate/20120525092205_create_chouette_time_slot.rb b/db/migrate/20120525092205_create_chouette_time_slot.rb new file mode 100644 index 000000000..1508645b1 --- /dev/null +++ b/db/migrate/20120525092205_create_chouette_time_slot.rb @@ -0,0 +1,22 @@ +class CreateChouetteTimeSlot < ActiveRecord::Migration + def up + create_table :time_slots, :force => true do |t| + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "name" + t.datetime "beginning_slot_time" + t.datetime "end_slot_time" + t.datetime "first_departure_time_in_slot" + t.datetime "last_departure_time_in_slot" + end + add_index "time_slots", ["objectid"], :name => "time_slots_objectid_key", :unique => true + end + + def down + remove_index "time_slots", :name => "time_slot_objectid_key" + drop_table :time_slots + end +end diff --git a/db/migrate/20120525092206_create_chouette_vehicle_journey.rb b/db/migrate/20120525092206_create_chouette_vehicle_journey.rb new file mode 100644 index 000000000..8e5c46b0c --- /dev/null +++ b/db/migrate/20120525092206_create_chouette_vehicle_journey.rb @@ -0,0 +1,34 @@ +class CreateChouetteVehicleJourney < ActiveRecord::Migration + def up + create_table :vehicle_journeys, :force => true do |t| + t.integer "route_id", :limit => 8 + t.integer "journey_pattern_id", :limit => 8 + t.integer "time_slot_id", :limit => 8 + t.integer "company_id", :limit => 8 + + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "comment" + t.string "status_value" + t.string "transport_mode" + t.string "published_journey_name" + t.string "published_journey_identifier" + t.string "facility" + t.string "vehicle_type_identifier" + + # TODO: delete this column that are here just for chouette-command compliance + t.integer "number" + end + add_index "vehicle_journeys", ["objectid"], :name => "vehicle_journeys_objectid_key", :unique => true + add_index "vehicle_journeys", ["route_id"], :name => "index_vehicle_journeys_on_route_id" + end + + def down + remove_index "vehicle_journeys", :name => "vehicle_journeys_objectid_key" + remove_index "vehicle_journeys", :name => "index_vehicle_journeys_on_route_id" + drop_table :vehicle_journeys + end +end diff --git a/db/migrate/20120525092207_create_chouette_vehicle_journey_at_stop.rb b/db/migrate/20120525092207_create_chouette_vehicle_journey_at_stop.rb new file mode 100644 index 000000000..330241972 --- /dev/null +++ b/db/migrate/20120525092207_create_chouette_vehicle_journey_at_stop.rb @@ -0,0 +1,25 @@ +class CreateChouetteVehicleJourneyAtStop < ActiveRecord::Migration + def up + create_table :vehicle_journey_at_stops, :force => true do |t| + t.integer "vehicle_journey_id", :limit => 8 + t.integer "stop_point_id", :limit => 8 + + t.string "connecting_service_id" + t.string "boarding_alighting_possibility" + + t.datetime "arrival_time" + t.datetime "departure_time" + t.datetime "waiting_time" + t.datetime "elapse_duration" + t.datetime "headway_frequency" + end + add_index "vehicle_journey_at_stops", ["vehicle_journey_id"], :name => "index_vehicle_journey_at_stops_on_vehicle_journey_id" + add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_pointid" + end + + def down + remove_index "vehicle_journey_at_stops", :name => "index_vehicle_journey_at_stops_on_vehicle_journey_id" + remove_index "vehicle_journey_at_stops", :name => "index_vehicle_journey_at_stops_on_stop_point_id" + drop_table :vehicle_journey_at_stops + end +end diff --git a/db/migrate/20120525092208_create_chouette_time_table_vehicle_journey.rb b/db/migrate/20120525092208_create_chouette_time_table_vehicle_journey.rb new file mode 100644 index 000000000..2c7ebb1f5 --- /dev/null +++ b/db/migrate/20120525092208_create_chouette_time_table_vehicle_journey.rb @@ -0,0 +1,16 @@ +class CreateChouetteTimeTableVehicleJourney < ActiveRecord::Migration + def up + 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 + end + add_index "time_tables_vehicle_journeys", ["time_table_id"], :name => "index_time_tables_vehicle_journeys_on_time_table_id" + add_index "time_tables_vehicle_journeys", ["vehicle_journey_id"], :name => "index_time_tables_vehicle_journeys_on_vehicle_journey_id" + end + + def down + remove_index "time_tables_vehicle_journeys", :name => "index_time_tables_vehicle_journeys_on_time_table_id" + remove_index "time_tables_vehicle_journeys", :name => "index_time_tables_vehicle_journeys_on_vehicle_journey_id" + drop_table :time_tables_vehicle_journeys + end +end diff --git a/db/migrate/20120525092209_create_chouette_access_point.rb b/db/migrate/20120525092209_create_chouette_access_point.rb new file mode 100644 index 000000000..a3733cfde --- /dev/null +++ b/db/migrate/20120525092209_create_chouette_access_point.rb @@ -0,0 +1,34 @@ +class CreateChouetteAccessPoint < ActiveRecord::Migration + def up + create_table :access_points, :force => true do |t| + t.string "objectid" + t.integer "object_version" + t.datetime "creation_time" + 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.string "long_lat_type" + 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.boolean "lift_availability" + t.datetime "mobility_restricted_suitability" + t.datetime "stairs_availability" + end + add_index "access_points", ["objectid"], :name => "access_points_objectid_key", :unique => true + end + + def down + drop_table :access_points + end +end diff --git a/db/migrate/20120525092210_create_chouette_access_link.rb b/db/migrate/20120525092210_create_chouette_access_link.rb new file mode 100644 index 000000000..8ddccd7bc --- /dev/null +++ b/db/migrate/20120525092210_create_chouette_access_link.rb @@ -0,0 +1,33 @@ +class CreateChouetteAccessLink < ActiveRecord::Migration + def up + create_table :access_links, :force => true do |t| + t.integer "access_point_id", :limit => 8 + t.integer "stop_area_id", :limit => 8 + + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "name" + t.string "comment" + t.decimal "link_distance", :precision => 19, :scale => 2 + t.boolean "lift_availability" + t.boolean "mobility_restricted_suitability" + t.boolean "stairs_availability" + t.time "default_duration" + t.time "frequent_traveller_duration" + t.time "occasional_traveller_duration" + t.time "mobility_restricted_traveller_duration" + + t.string "link_type" + t.integer "int_user_needs" + t.string "link_orientation" + end + add_index "access_links", ["objectid"], :name => "access_links_objectid_key", :unique => true + end + + def down + drop_table :access_links + end +end diff --git a/db/migrate/20120525092211_create_chouette_facility.rb b/db/migrate/20120525092211_create_chouette_facility.rb new file mode 100644 index 000000000..9f4cb2848 --- /dev/null +++ b/db/migrate/20120525092211_create_chouette_facility.rb @@ -0,0 +1,34 @@ +class CreateChouetteFacility < ActiveRecord::Migration + def up + create_table :facilities, :force => true do |t| + t.integer "stop_area_id", :limit => 8 + t.integer "line_id", :limit => 8 + t.integer "connection_link_id",:limit => 8 + t.integer "stop_point_id", :limit => 8 + + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "name" + t.string "comment" + t.string "description" + t.boolean "free_access" + 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.string "projection_type" + t.string "country_code" + t.string "street_name" + t.string "contained_in" + end + add_index "facilities", ["objectid"], :name => "facilities_objectid_key", :unique => true + end + + def down + drop_table :facilities + end +end diff --git a/db/migrate/20120525092212_create_chouette_facility_feature.rb b/db/migrate/20120525092212_create_chouette_facility_feature.rb new file mode 100644 index 000000000..0ed65c172 --- /dev/null +++ b/db/migrate/20120525092212_create_chouette_facility_feature.rb @@ -0,0 +1,12 @@ +class CreateChouetteFacilityFeature < ActiveRecord::Migration + def up + create_table :facilities_features, :id => false, :force => true do |t| + t.integer "facility_id", :limit => 8 + t.integer "choice_code" + end + end + + def down + drop_table :facilities_features + end +end diff --git a/db/migrate/20120525092213_create_chouette_group_of_line.rb b/db/migrate/20120525092213_create_chouette_group_of_line.rb new file mode 100644 index 000000000..c64a571ba --- /dev/null +++ b/db/migrate/20120525092213_create_chouette_group_of_line.rb @@ -0,0 +1,18 @@ +class CreateChouetteGroupOfLine < ActiveRecord::Migration + def up + create_table :group_of_lines, :force => true do |t| + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + + t.string "name" + t.string "comment" + end + add_index "group_of_lines", ["objectid"], :name => "group_of_lines_objectid_key", :unique => true + end + + def down + drop_table :group_of_lines + end +end diff --git a/db/migrate/20120525092214_create_chouette_group_of_line_line.rb b/db/migrate/20120525092214_create_chouette_group_of_line_line.rb new file mode 100644 index 000000000..3763386df --- /dev/null +++ b/db/migrate/20120525092214_create_chouette_group_of_line_line.rb @@ -0,0 +1,12 @@ +class CreateChouetteGroupOfLineLine < ActiveRecord::Migration + def up + 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 + end + end + + def down + drop_table :group_of_lines_lines + end +end diff --git a/db/migrate/20120525092215_create_chouette_routing_constrains_line.rb b/db/migrate/20120525092215_create_chouette_routing_constrains_line.rb new file mode 100644 index 000000000..fa2dd2f20 --- /dev/null +++ b/db/migrate/20120525092215_create_chouette_routing_constrains_line.rb @@ -0,0 +1,12 @@ +class CreateChouetteRoutingConstrainsLine < ActiveRecord::Migration + def up + create_table :routing_constraints_lines, :id => false, :force => true do |t| + t.integer "stop_area_id", :limit => 8 + t.integer "line_id", :limit => 8 + end + end + + def down + drop_table :routing_constraints_lines + end +end diff --git a/db/migrate/20120525092216_create_chouette_stoparea_stoparea.rb b/db/migrate/20120525092216_create_chouette_stoparea_stoparea.rb new file mode 100644 index 000000000..42e0ee5dd --- /dev/null +++ b/db/migrate/20120525092216_create_chouette_stoparea_stoparea.rb @@ -0,0 +1,12 @@ +class CreateChouetteStopareaStoparea < ActiveRecord::Migration + def up + create_table :stop_areas_stop_areas, :id => false, :force => true do |t| + t.integer "child_id", :limit => 8 + t.integer "parent_id", :limit => 8 + end + end + + def down + drop_table :stop_areas_stop_areas + end +end diff --git a/db/migrate/20120531091529_create_chouette_pt_link.rb b/db/migrate/20120531091529_create_chouette_pt_link.rb new file mode 100644 index 000000000..57b4b2e63 --- /dev/null +++ b/db/migrate/20120531091529_create_chouette_pt_link.rb @@ -0,0 +1,21 @@ +class CreateChouettePtLink < ActiveRecord::Migration +def up + create_table "pt_links", :force => true do |t| + t.integer "start_of_link_id", :limit => 8 + t.integer "end_of_link_id", :limit => 8 + t.integer "route_id", :limit => 8 + t.string "objectid", :null => false + t.integer "object_version" + t.datetime "creation_time" + t.string "creator_id" + t.string "name" + t.string "comment" + t.decimal "link_distance", :precision => 19, :scale => 2 + end + add_index "pt_links", ["objectid"], :name => "pt_links_objectid_key", :unique => true + end + + def down + drop_table :pt_links + end +end |
