OpenTransitTools / gtfsdb

GTFS ORM using SQLAlchemy
Mozilla Public License 2.0
157 stars 45 forks source link

connect to multiple databases, with different schemas, etc... #43

Open fpurcell opened 5 years ago

fpurcell commented 5 years ago

what: allow gtfsdb to connect to multiple databases and/or different schemas in a single instance problem: currently gtfsdb monkey patches ORM classes when using either schema or geom tables (postgres), etc... Because of these 'global' changes, we can only connect to a single db / schema.
why: would like to connect to agency X and agency Y in same memory space.

mark-lester commented 4 years ago

I have extended GTFS with a "DataSet" concept, everything belongs to DataSet. I'd like to scrap my loader for gtfsdb and am considering writing a tool to take an uploaded gtfs db and decant that into my main tables with the extensions. I would prefer if all the imported keys were mapped onto the same space (i.e. unique in that table, not by concatenating with the DataSetId) , so that means resolving the id's again. if there is any public work on maintaining a GTFS db of multiple GTFS data sets, please let me know.