Skip to content

Commit

Permalink
UPDATE: mongoupgrade and sample variable values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Kulhanek committed Jul 30, 2019
1 parent 7dad8f4 commit 4aa0bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upgrade/mongoupgrade-sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ SELECT * FROM accounts_annotatorprofile;
EOT

echo Cleaning mongodb user profiles, copy annotation from v1 collection
mongo -u $MONGODB_USR -p $MONGODB_PWD -d MONGODB_NAME <<EOF
mongo -u $MONGODB_USR -p $MONGODB_PWD $MONGODB_NAME <<EOF
db.userprofile.drop()
db.userstomigrate.drop()
db.b2note_app_annotation.aggregate([{$match:{} },{ $out: "annotations"} ])
EOF

echo Importing user db to migrate
mongoimport --d $MONGODB_NAME -u $MONGODB_USR -p $MONGODB_PWD --collection userstomigrate --file userprofiles.csv --type csv --headerline
mongoimport -d $MONGODB_NAME -u $MONGODB_USR -p $MONGODB_PWD --collection userstomigrate --file userprofiles.csv --type csv --headerline

0 comments on commit 4aa0bc4

Please sign in to comment.