Commit be93e668 by John Jarvis

Merge pull request #1072 from edx/jarv/santize-split

Jarv/santize split
parents aa2f9c11 e138fa4a
...@@ -137,7 +137,7 @@ if __name__ == '__main__': ...@@ -137,7 +137,7 @@ if __name__ == '__main__':
if args.clean_wwc: if args.clean_wwc:
# Run the mysql clean sql file # Run the mysql clean sql file
sanitize_cmd = """mysql -u root -p{root_pass} -h{db_host} < {sanitize_wwc_sql_file} """.format( sanitize_cmd = """mysql -u root -p{root_pass} -h{db_host} wwc < {sanitize_wwc_sql_file} """.format(
root_pass=args.password, root_pass=args.password,
db_host=db_host, db_host=db_host,
sanitize_wwc_sql_file=sanitize_wwc_sql_file) sanitize_wwc_sql_file=sanitize_wwc_sql_file)
...@@ -146,7 +146,7 @@ if __name__ == '__main__': ...@@ -146,7 +146,7 @@ if __name__ == '__main__':
if args.clean_prod_grader: if args.clean_prod_grader:
# Run the mysql clean sql file # Run the mysql clean sql file
sanitize_cmd = """mysql -u root -p{root_pass} -h{db_host} < {sanitize_prod_grader_sql_file} """.format( sanitize_cmd = """mysql -u root -p{root_pass} -h{db_host} prod_grader < {sanitize_prod_grader_sql_file} """.format(
root_pass=args.password, root_pass=args.password,
db_host=db_host, db_host=db_host,
sanitize_prod_grader_sql_file=sanitize_prod_grader_sql_file) sanitize_prod_grader_sql_file=sanitize_prod_grader_sql_file)
......
...@@ -4,7 +4,7 @@ SET FOREIGN_KEY_CHECKS=0; ...@@ -4,7 +4,7 @@ SET FOREIGN_KEY_CHECKS=0;
Grader has its own django core tables. Grader has its own django core tables.
*/ */
UPDATE prod_grader.auth_user UPDATE auth_user
set set
email = concat('success+',cast(id AS CHAR),'@simulator.amazonses.com'), email = concat('success+',cast(id AS CHAR),'@simulator.amazonses.com'),
username = concat('user-',cast(id AS CHAR)), username = concat('user-',cast(id AS CHAR)),
......
...@@ -4,11 +4,11 @@ SET FOREIGN_KEY_CHECKS=0; ...@@ -4,11 +4,11 @@ SET FOREIGN_KEY_CHECKS=0;
Remove all password hashes, even for edx employees Remove all password hashes, even for edx employees
*/ */
UPDATE wwc.auth_user UPDATE auth_user
set set
password = null; password = null;
UPDATE wwc.student_passwordhistory UPDATE student_passwordhistory
set set
password = null; password = null;
...@@ -17,7 +17,7 @@ UPDATE wwc.student_passwordhistory ...@@ -17,7 +17,7 @@ UPDATE wwc.student_passwordhistory
Anonymize other user information. Skip @edx.org accounts Anonymize other user information. Skip @edx.org accounts
*/ */
UPDATE wwc.auth_user UPDATE auth_user
set set
email = concat('success+',cast(id AS CHAR),'@simulator.amazonses.com'), email = concat('success+',cast(id AS CHAR),'@simulator.amazonses.com'),
username = concat('user-',cast(id AS CHAR)), username = concat('user-',cast(id AS CHAR)),
...@@ -31,7 +31,7 @@ UPDATE wwc.auth_user ...@@ -31,7 +31,7 @@ UPDATE wwc.auth_user
There are a handful of email changes requests captured in flight. There are a handful of email changes requests captured in flight.
*/ */
UPDATE wwc.student_pendingemailchange UPDATE student_pendingemailchange
set new_email = concat('success+',cast(user_id AS CHAR),'@simulator.amazonses.com'); set new_email = concat('success+',cast(user_id AS CHAR),'@simulator.amazonses.com');
/* /*
...@@ -40,7 +40,7 @@ UPDATE wwc.student_pendingemailchange ...@@ -40,7 +40,7 @@ UPDATE wwc.student_pendingemailchange
sending email, but cannot hurt. sending email, but cannot hurt.
*/ */
UPDATE wwc.student_courseenrollmentallowed UPDATE student_courseenrollmentallowed
set email = concat('success+','courseenrollmentallowed_',cast(id AS CHAR),'@simulator.amazonses.com'); set email = concat('success+','courseenrollmentallowed_',cast(id AS CHAR),'@simulator.amazonses.com');
/* /*
...@@ -48,7 +48,7 @@ UPDATE wwc.student_courseenrollmentallowed ...@@ -48,7 +48,7 @@ UPDATE wwc.student_courseenrollmentallowed
This will also empty user profile data for edx employees This will also empty user profile data for edx employees
*/ */
UPDATE wwc.auth_userprofile UPDATE auth_userprofile
set set
name = concat('user-',cast(id as CHAR)), name = concat('user-',cast(id as CHAR)),
language = "", language = "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment