Permalink
Browse files

updated indexes in models

  • Loading branch information...
brendannee committed Mar 3, 2012
1 parent 086fd4e commit b978a63c2796ce60750410bf3759c477b5723f07
Showing with 5 additions and 7 deletions.
  1. +0 −2 lib/gtfs.js
  2. +1 −1 models/Stop.js
  3. +2 −2 models/StopTime.js
  4. +2 −2 models/Trip.js
View
@@ -163,8 +163,6 @@ module.exports = {
});
function getTrips(cb){
- Trip.find({agency_key: agency_key}).run(function(e, result){ console.log(result) });
-
Trip
.count({
agency_key: agency_key
View
@@ -3,7 +3,7 @@ var mongoose = require('mongoose')
var Stop = mongoose.model('Stop', new Schema({
agency_key : { type: String, index: true }
- , stop_id : { type: String }
+ , stop_id : { type: String, index: true }
, stop_code : { type: String }
, stop_name : { type: String }
, stop_desc : { type: String }
View
@@ -6,8 +6,8 @@ var StopTime = mongoose.model('StopTime', new Schema({
agency_key : { type: String, index: true }
, trip_id : { type: String, index: true }
, arrival_time : { type: String, get: utils.secondsToTime, set: utils.timeToSeconds }
- , departure_time : { type: String, index:true, get: utils.secondsToTime, set: utils.timeToSeconds }
- , stop_id : { type: String, index:true }
+ , departure_time : { type: String, index: true, get: utils.secondsToTime, set: utils.timeToSeconds }
+ , stop_id : { type: String, index: true }
, stop_sequence : { type: Number, index: true }
, stop_headsign : { type: String }
, pickup_type : { type: String }
View
@@ -4,11 +4,11 @@ var mongoose = require('mongoose')
var Trip = mongoose.model('Trip', new Schema({
agency_key : { type: String, index: true }
, route_id : { type: String, index: true }
- , service_id : { type: String, index:true }
+ , service_id : { type: String, index: true }
, trip_id : { type: String }
, trip_headsign : { type: String }
, trip_short_name : { type: String }
- , direction_id : { type: Number, index:true, min:0, max:1 }
+ , direction_id : { type: Number, index: true, min:0, max:1 }
, block_id : { type: String }
, shape_id : { type: String }
}, { strict: true }));

0 comments on commit b978a63

Please sign in to comment.