Renamed courseData db collection in the code and ran the webscraper to add the new courseInfo collection to the db
Needed to heighten the permissions of user tranzoneAdmin in the mongo shell to allow dropping databases, listing collections, etc:
> use admin
switched to db admin
> db.grantRolesToUser("tranzoneAdmin", [ {role: "dbOwner", db: "courseplannerdb-dev"} ])
> db.grantRolesToUser("tranzoneAdmin", [ {role: "dbOwner", db: "courseplannerdb"} ])
Test
I tested the webscraper and the backend (no changes made to frontend) and it was all working. Don't worry about et.
After merging
Since PR #120 is still open for testing, I actually left the courseData collection in both the dev and prod DBs. Once this PR is merged, I will remove the collection from both DBs. Currently the dev DB has both courseData and courseInfo, and they are identical:
> use courseplannerdb-dev
switched to db courseplannerdb-dev
> show collections
courseData
courseInfo
courseSequences
> db.getCollection("courseData").find({}).size();
2128
> db.getCollection("courseInfo").find({}).size();
2128
resolves #117
Summary
Renamed
courseData
db collection in the code and ran the webscraper to add the newcourseInfo
collection to the dbNeeded to heighten the permissions of user tranzoneAdmin in the mongo shell to allow dropping databases, listing collections, etc:
Test
I tested the webscraper and the backend (no changes made to frontend) and it was all working. Don't worry about et.
After merging
Since PR #120 is still open for testing, I actually left the
courseData
collection in both the dev and prod DBs. Once this PR is merged, I will remove the collection from both DBs. Currently the dev DB has bothcourseData
andcourseInfo
, and they are identical: