Temporarily deploy PIS data to testing collection

This commit is contained in:
Fred Boniface
2024-11-13 00:28:11 +00:00
parent 0f6f18b378
commit d35a2a010e
4 changed files with 17 additions and 36 deletions

View File

@@ -53,7 +53,7 @@ func PutPisMetadata(version string) error {
// Puts complete PIS dataset to database
func PutPisData(pis *[]database.PIS) (int64, error) {
coll := MongoClient.Database(DatabaseName).Collection(PisCollection)
coll := MongoClient.Database(DatabaseName).Collection("pis_testing")
var docs []interface{}
for _, entry := range *pis {
@@ -69,7 +69,7 @@ func PutPisData(pis *[]database.PIS) (int64, error) {
}
func CreatePisIndeces() error {
coll := MongoClient.Database(DatabaseName).Collection(PisCollection)
coll := MongoClient.Database(DatabaseName).Collection("pis_testing")
crsIndex := mongo.IndexModel{
Keys: bson.D{{"stops", 1}},