Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
be93e668
Commit
be93e668
authored
May 07, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1072 from edx/jarv/santize-split
Jarv/santize split
parents
aa2f9c11
e138fa4a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
util/vpc-tools/db-clone.py
+2
-2
util/vpc-tools/sanitize-db-prod_grader.sql
+1
-1
util/vpc-tools/sanitize-db-wwc.sql
+6
-6
No files found.
util/vpc-tools/db-clone.py
View file @
be93e668
...
...
@@ -137,7 +137,7 @@ if __name__ == '__main__':
if
args
.
clean_wwc
:
# 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
,
db_host
=
db_host
,
sanitize_wwc_sql_file
=
sanitize_wwc_sql_file
)
...
...
@@ -146,7 +146,7 @@ if __name__ == '__main__':
if
args
.
clean_prod_grader
:
# 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
,
db_host
=
db_host
,
sanitize_prod_grader_sql_file
=
sanitize_prod_grader_sql_file
)
...
...
util/vpc-tools/sanitize-db-prod_grader.sql
View file @
be93e668
...
...
@@ -4,7 +4,7 @@ SET FOREIGN_KEY_CHECKS=0;
Grader has its own django core tables.
*/
UPDATE
prod_grader
.
auth_user
UPDATE
auth_user
set
email
=
concat
(
'success+'
,
cast
(
id
AS
CHAR
),
'@simulator.amazonses.com'
),
username
=
concat
(
'user-'
,
cast
(
id
AS
CHAR
)),
...
...
util/vpc-tools/sanitize-db-wwc.sql
View file @
be93e668
...
...
@@ -4,11 +4,11 @@ SET FOREIGN_KEY_CHECKS=0;
Remove all password hashes, even for edx employees
*/
UPDATE
wwc
.
auth_user
UPDATE
auth_user
set
password
=
null
;
UPDATE
wwc
.
student_passwordhistory
UPDATE
student_passwordhistory
set
password
=
null
;
...
...
@@ -17,7 +17,7 @@ UPDATE wwc.student_passwordhistory
Anonymize other user information. Skip @edx.org accounts
*/
UPDATE
wwc
.
auth_user
UPDATE
auth_user
set
email
=
concat
(
'success+'
,
cast
(
id
AS
CHAR
),
'@simulator.amazonses.com'
),
username
=
concat
(
'user-'
,
cast
(
id
AS
CHAR
)),
...
...
@@ -31,7 +31,7 @@ UPDATE wwc.auth_user
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'
);
/*
...
...
@@ -40,7 +40,7 @@ UPDATE wwc.student_pendingemailchange
sending email, but cannot hurt.
*/
UPDATE
wwc
.
student_courseenrollmentallowed
UPDATE
student_courseenrollmentallowed
set
email
=
concat
(
'success+'
,
'courseenrollmentallowed_'
,
cast
(
id
AS
CHAR
),
'@simulator.amazonses.com'
);
/*
...
...
@@ -48,7 +48,7 @@ UPDATE wwc.student_courseenrollmentallowed
This will also empty user profile data for edx employees
*/
UPDATE
wwc
.
auth_userprofile
UPDATE
auth_userprofile
set
name
=
concat
(
'user-'
,
cast
(
id
as
CHAR
)),
language
=
""
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment