Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View api-server-test-data-import.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# Drop and Recreate MySQL
# mysqladmin -uroot -p'secret' drop wn_api
# mysqladmin -uroot -p'secret' drop wn_site
# mysqladmin -uroot -p'secret' create wn_api
# mysqladmin -uroot -p'secret' create wn_site
 
# Clean up Mongo
# use ugc
# db.word_of_the_day.drop()
#
# use word
# db.dictionary_entry.drop()
# db.edge.drop()
# db.node.drop()
# db.rels.drop()
# db.start_edge.drop()
#
# use corpus
# db.doc_metadata.drop()
# db.top_examples.drop()
# db.sentences_with_scores.drop()
 
# Stuff's on the shared drive
cd /Volumes/Data/api-server-test-data
 
cd mysql/wn_api
mysql -uroot -p'secret' wn_api < comment.sql
mysql -uroot -p'secret' wn_api < tag.sql
mysql -uroot -p'secret' wn_api < user_handle.sql
mysql -uroot -p'secret' wn_api < user_profile.sql
mysql -uroot -p'secret' wn_api < user_settings.sql
mysql -uroot -p'secret' wn_api < users.sql
 
cd ../wn_site
mysql -uroot -p'secret' wn_site < words.sql
 
cd ../mongo
mongorestore -d ugc -c word_of_the_day.bson
 
mongorestore -d word -c dictionary_entry.bson
mongorestore -d word -c edge.bson
mongorestore -d word -c node.bson
mongorestore -d word -c rels.bson
mongorestore -d word -c start_edge.bson
 
mongorestore -d corpus -c doc_metadata.bson
mongorestore -d corpus -c top_examples.bson
mongorestore -d corpus -c sentences_with_scores.bson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.