evansiroky / gtfs-sequelize

A model of the static GTFS using sequelize.
MIT License
19 stars 6 forks source link

set current_schema option #31

Closed sign0 closed 7 years ago

sign0 commented 8 years ago

Hi Evan, I would like to configure a specific schema to import GTFS. I tried this postgres url connection string, but without success: 'postgres://username:password@localhost:5432/gtfs?current_schema=test'.

Do you have an idea to reach my goals? ps: this would be very helpful for everyone to be able to have several gtfs in the same database without conflicts.

Currently, I import everything into the public schema and at the end of the import I rename this schema then I recreate a public schema for my future imports. But I guess there's a best way to do it ! :)

Thanks !

evansiroky commented 8 years ago

Looks like this needs to be included in the model definition of each Sequelize table definition (See docs). Will try to work on this soon.