Skip to content

Commit

Permalink
Added script solutions.json to load test data to user micro, user sol…
Browse files Browse the repository at this point in the history
…utions sended
  • Loading branch information
jonatanvicente committed Jun 5, 2024
1 parent c61beca commit cc4e9db
Show file tree
Hide file tree
Showing 4 changed files with 458 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
echo Beginning of insertion

mongoimport --db=users --collection=solutions --jsonArray --file=user_score.json
mongoimport --db=users --collection=solutions --jsonArray --file=solutions.json

echo "Creating unique index in users.solutions collection"
mongosh --eval "db.getSiblingDB('users').solutions.createIndex({ user_id: 1, challenge_id: 1 }, { unique: true })"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Beginning of insertion"

mongoimport --db=users --username admin_user --authenticationDatabase admin --password yxRG4sYBDjPFzbh5 --collection=solutions --jsonArray --file=user_solution.json
mongoimport --db=users --username admin_user --authenticationDatabase admin --password yxRG4sYBDjPFzbh5 --collection=solutions --jsonArray --file=solutions.json

echo "Creating unique index in solutions collection"
mongosh --eval "db.getSiblingDB('users').solutions.createIndex({ user_id: 1, challenge_id: 1 }, { unique: true })"
Expand Down
Loading

0 comments on commit cc4e9db

Please sign in to comment.