Import journals in database
Closed this issue · 6 comments
bartaelterman commented
Import journals in database
bartaelterman commented
I have a csvfile with news journals. These should be imported in the application.
Column 1: name
Column 2: spider_name
Delimiter: ";"
bartaelterman commented
I needed a data migration script for developement. Maybe this can help: https://github.com/Datafable/epu-index/blob/master/tmp/migrate_data.py
niconoe commented
Command implemented. Two addiditonal questions:
- Should I run it on Heroku now with the journals.csv file from old_data (Google Docs folder)?
- For now, the command expects the CSV dialect to be the one from old_data/journals.csv (no header line, ; separator, ...). If we ever need more flexibility, tell me and I'll implement something more sophisticated.
bartaelterman commented
Thanks!
- Yes, should be run on Heroku.
- No, no more flexibility is needed for this.
niconoe commented
Data loaded on Heroku. Please note there was already an entry for "Het Laatste Nieuws", I didn't dared to delete it since there were linked articles!
bartaelterman commented
Ok. Actually that's all dummy data. So next time, the table can be trunced before uploading new data. I did not consider that database as production so far.