-- Removing of any columns will happen through Django migrations

-- REMOVE SURVEYID : 17

SET foreign_key_checks = 0;
DELETE FROM survey_questionsurvey WHERE survey_id = 17;
DELETE FROM survey_entity WHERE id = 29;
DELETE FROM survey_question WHERE entity_ptr_id = 29;
DELETE FROM survey_survey WHERE id = 17;
SET foreign_key_checks = 1;

-- REMOVE ALL NON PARTICIPANT ALLOWED RESPONSES

DELETE FROM survey_allowedresponse WHERE participant_id IS NULL;

-- DELETE PARTICIPANT ID : 319

SET foreign_key_checks = 0;
DELETE FROM participant_participantstudyconsent WHERE participant_id = 319;
DELETE FROM participant_participant WHERE id = 319;
SET foreign_key_checks = 1;

-- UPDATE ALL SURVEY/QUESTIONS TITLES

UPDATE survey_survey SET title = "Are you in pain now?" WHERE id = 1;
UPDATE survey_survey SET title = "How was sex?" WHERE id = 10;
UPDATE survey_survey SET title = "Prescreening" WHERE id = 11;
UPDATE survey_survey SET title = "Quiz" WHERE id = 12;
UPDATE survey_survey SET title = "Do you have your period?" WHERE id = 13;
UPDATE survey_survey SET title = "Profile" WHERE id = 130;
UPDATE survey_survey SET title = "Hormones" WHERE id = 1330;
UPDATE survey_survey SET title = "Medications" WHERE id = 1331;
UPDATE survey_survey SET title = "Supplements" WHERE id = 1332;
UPDATE survey_survey SET title = "Any GI/Urine issues?" WHERE id = 14;
UPDATE survey_survey SET title = "Daily journal" WHERE id = 15;
UPDATE survey_survey SET title = "Which activities were hard to do?" WHERE id = 16;
UPDATE survey_survey SET title = "Anything else to note?" WHERE id = 17;
UPDATE survey_survey SET title = "Foods that worsen symptoms" WHERE id = 18;
UPDATE survey_survey SET title = "Take any medication?" WHERE id = 19;
UPDATE survey_survey SET title = "Experiencing something else?" WHERE id = 2;
UPDATE survey_survey SET title = "Foods that improve symptoms" WHERE id = 20;
UPDATE survey_survey SET title = "Exercises that improve symptoms" WHERE id = 21;
UPDATE survey_survey SET title = "Exercises that worsen symptoms" WHERE id = 22;
UPDATE survey_survey SET title = "Take any supplements?" WHERE id = 23;
UPDATE survey_survey SET title = "Which activities were hard to do? (Pictures)" WHERE id = 24;
UPDATE survey_survey SET title = "How is your mood?" WHERE id = 3;
UPDATE survey_survey SET title = "Are you bleeding?" WHERE id = 4;
UPDATE survey_survey SET title = "How was your day?" WHERE id = 5;
UPDATE survey_survey SET title = "What did you do to self manage?" WHERE id = 6;
UPDATE survey_survey SET title = "What did you eat?" WHERE id = 7;
UPDATE survey_survey SET title = "Did you exercise?" WHERE id = 8;
UPDATE survey_survey SET title = "Take any hormones?" WHERE id = 9;
UPDATE survey_question SET title="Where is the pain?" WHERE entity_ptr_id = 1;
UPDATE survey_question SET title="Describe the pain" WHERE entity_ptr_id = 2;
UPDATE survey_question SET title="How severe is the pain?" WHERE entity_ptr_id = 3;
UPDATE survey_question SET title="How was sex?" WHERE entity_ptr_id = 16;
UPDATE survey_question SET title="What type of penetration?" WHERE entity_ptr_id = 17;
UPDATE survey_question SET title="Have you ever had a menstrual period?" WHERE entity_ptr_id = 19;
UPDATE survey_question SET title="Have you experienced symptoms of endometriosis in the past 3 months?" WHERE entity_ptr_id = 20;
UPDATE survey_question SET title="I can stop participating at any time" WHERE entity_ptr_id = 21;
UPDATE survey_question SET title="Phendo does not replace medical care" WHERE entity_ptr_id = 22;
UPDATE survey_question SET title="Phendo is for me to track my experience of endometriosis & researchers to learn more about the disease" WHERE entity_ptr_id = 23;
UPDATE survey_question SET title="Do you have your period?" WHERE entity_ptr_id = 24;
UPDATE survey_question SET title="Period flow" WHERE entity_ptr_id = 38;
UPDATE survey_question SET title="Thanks for participating in Phendo!" WHERE entity_ptr_id = 290;
UPDATE survey_question SET title="When were you born?" WHERE entity_ptr_id = 240;
UPDATE survey_question SET title="What is your current height?" WHERE entity_ptr_id = 250;
UPDATE survey_question SET title="What is your current weight?" WHERE entity_ptr_id = 280;
UPDATE survey_question SET title="Weight pounds / kilograms" WHERE entity_ptr_id = 750;
UPDATE survey_question SET title="Do you have endometriosis?" WHERE entity_ptr_id = 260;
UPDATE survey_question SET title="Have you had any periods in the last three months?" WHERE entity_ptr_id = 270;
UPDATE survey_question SET title="What gender do you indentify as?" WHERE entity_ptr_id = 200;
UPDATE survey_question SET title="Are you sexually active?" WHERE entity_ptr_id = 201;
UPDATE survey_question SET title="What is your race/ethnicity?" WHERE entity_ptr_id = 202;
UPDATE survey_question SET title="What is your relationship status?" WHERE entity_ptr_id = 500;
UPDATE survey_question SET title="What is your highest level of education?" WHERE entity_ptr_id = 203;
UPDATE survey_question SET title="What is your annual household income?" WHERE entity_ptr_id = 204;
UPDATE survey_question SET title="What is your employment status?" WHERE entity_ptr_id = 209;
UPDATE survey_question SET title="What is your primary work location?" WHERE entity_ptr_id = 210;
UPDATE survey_question SET title="What country do you live in?" WHERE entity_ptr_id = 206;
UPDATE survey_question SET title="What state do you live in?" WHERE entity_ptr_id = 766;
UPDATE survey_question SET title="What is your living environment?" WHERE entity_ptr_id = 207;
UPDATE survey_question SET title="Enter hormones you are taking" WHERE entity_ptr_id = 241;
UPDATE survey_question SET title="Enter hormonse dose" WHERE entity_ptr_id = 242;
UPDATE survey_question SET title="Date started hormones" WHERE entity_ptr_id = 243;
UPDATE survey_question SET title="Enter medications you are taking" WHERE entity_ptr_id = 244;
UPDATE survey_question SET title="Enter medication dose" WHERE entity_ptr_id = 245;
UPDATE survey_question SET title="Date started taking medication" WHERE entity_ptr_id = 246;
UPDATE survey_question SET title="Enter supplements you are taking" WHERE entity_ptr_id = 247;
UPDATE survey_question SET title="Enter supplement dose" WHERE entity_ptr_id = 248;
UPDATE survey_question SET title="Date started taking supplement" WHERE entity_ptr_id = 249;
UPDATE survey_question SET title="What's happening in your gastrointestinal/urinary system?" WHERE entity_ptr_id = 25;
UPDATE survey_question SET title="GI Issues severity" WHERE entity_ptr_id = 26;
UPDATE survey_question SET title="Something else to note?" WHERE entity_ptr_id = 27;
UPDATE survey_question SET title="Anything else to note?" WHERE entity_ptr_id = 29;
UPDATE survey_question SET title="Foods that worsen symptoms" WHERE entity_ptr_id = 30;
UPDATE survey_question SET title="What medication did you take?" WHERE entity_ptr_id = 401;
UPDATE survey_question SET title="What are you experiencing?" WHERE entity_ptr_id = 4;
UPDATE survey_question SET title="How severe is the symptom?" WHERE entity_ptr_id = 5;
UPDATE survey_question SET title="Foods that improve symptoms" WHERE entity_ptr_id = 31;
UPDATE survey_question SET title="Exercises that improve symptoms" WHERE entity_ptr_id = 32;
UPDATE survey_question SET title="Exercises that worsen symptoms" WHERE entity_ptr_id = 33;
UPDATE survey_question SET title="Take any supplements?" WHERE entity_ptr_id = 400;
UPDATE survey_question SET title="Which activities did you have trouble with today?" WHERE entity_ptr_id = 600;
UPDATE survey_question SET title="How is your mood?" WHERE entity_ptr_id = 6;
UPDATE survey_question SET title="Feeling Negative?" WHERE entity_ptr_id = 7;
UPDATE survey_question SET title="How was your day?" WHERE entity_ptr_id = 9;
UPDATE survey_question SET title="What did you do to self manage?" WHERE entity_ptr_id = 10;
UPDATE survey_question SET title="How did it help?" WHERE entity_ptr_id = 11;
UPDATE survey_question SET title="Did you eat any foods that improve symptoms?" WHERE entity_ptr_id = 12;
UPDATE survey_question SET title="Have any effect?" WHERE entity_ptr_id = 13;
UPDATE survey_question SET title="Did you eat any foods that worsen symptoms?" WHERE entity_ptr_id = 34;
UPDATE survey_question SET title="Have any effect?" WHERE entity_ptr_id = 37;
UPDATE survey_question SET title="Did you do any of these exercises that help?" WHERE entity_ptr_id = 14;
UPDATE survey_question SET title="Have any effect?" WHERE entity_ptr_id = 18;
UPDATE survey_question SET title="Did you do any of these exercises that hurt?" WHERE entity_ptr_id = 35;
UPDATE survey_question SET title="Have any effect?" WHERE entity_ptr_id = 36;
UPDATE survey_question SET title="Take any hormones?" WHERE entity_ptr_id = 15;