biocore/american-gut-web — pull request #342 by adamrp (2014-10-29 23:08:33+00:00)
Title: Survey map

These changes are required for the survey mapping (see [this gist](https://gist.github.com/adamrp/39f41c56ed39cd101b0e) an [this gist](https://gist.github.com/adamrp/7a154a3079b55a7f5587), which will transfer the surveys). To test on your local system, you will need the "ag_insert_data1.sql" and "ag_insert_data2-brucewaynereplaced.sql" files.

To test:
1. comment out all lines (just temporary) in populate.sql; these are test lines that you do not need and will cause problems when loading the two "ag_insert_data" sql files
2. drop your ag database, and your ag_wwwuser role (if they exist)
3. `ag env make test`
4. psql -U postgres -d ag -f ag_insert_data1.sql
5. psql -U postgres -d ag -f ag_insert_data2-brucewaynereplaced.sql
6. python transfer_consent.py
7. python map_surveys.py

@ElDeveloper and @teravest, you are the two people that are probably in the best position to test (@wasade and I have already tested, but we only have one shot at doing this correctly on live, so more testing is always better). If you need the "ag_insert_data" sql files, find me on gchat or email me.