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
edx
configuration
Commits
e9e4d2f9
Commit
e9e4d2f9
authored
Aug 24, 2015
by
Max Rothman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edxapp DB sanitization script moved into sysadmin repo
parent
ee1e58f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
65 deletions
+0
-65
util/vpc-tools/sanitize-db-wwc.sql
+0
-65
No files found.
util/vpc-tools/sanitize-db-wwc.sql
deleted
100644 → 0
View file @
ee1e58f1
SET
FOREIGN_KEY_CHECKS
=
0
;
/*
Remove all password hashes, even for edx employees
*/
UPDATE
auth_user
set
password
=
'!'
;
UPDATE
student_passwordhistory
set
password
=
'!'
;
/*
Rewrite all emails to used the SES simulator, simulating success.
Anonymize other user information. Skip @edx.org accounts
*/
UPDATE
auth_user
set
email
=
concat
(
'success+'
,
cast
(
id
AS
CHAR
),
'@simulator.amazonses.com'
),
username
=
SUBSTRING
(
SHA1
(
CONCAT
(
username
,
CAST
(
id
as
CHAR
)))
FROM
1
FOR
30
),
first_name
=
concat
(
'user-'
,
cast
(
id
AS
CHAR
)),
last_name
=
concat
(
'user-'
,
cast
(
id
AS
CHAR
)),
last_login
=
null
,
date_joined
=
"1970-01-01 00:00:00"
where
email
not
like
(
'%@edx.org'
);
/*
There are a handful of email changes requests captured in flight.
*/
UPDATE
student_pendingemailchange
set
new_email
=
concat
(
'success+'
,
cast
(
user_id
AS
CHAR
),
'@simulator.amazonses.com'
);
/*
Differs slightly to prevent creating duplicate email records.
User id isn't stored here and this email is probably not used for
sending email, but cannot hurt.
*/
UPDATE
student_courseenrollmentallowed
set
email
=
concat
(
'success+'
,
'courseenrollmentallowed_'
,
cast
(
id
AS
CHAR
),
'@simulator.amazonses.com'
);
/*
Set the name to the userid and empty the other fields
This will also empty user profile data for edx employees
*/
UPDATE
auth_userprofile
set
name
=
concat
(
'user-'
,
cast
(
id
as
CHAR
)),
language
=
""
,
location
=
""
,
meta
=
""
,
gender
=
null
,
mailing_address
=
null
,
year_of_birth
=
null
,
level_of_education
=
null
,
goals
=
null
,
country
=
""
,
city
=
null
;
SET
FOREIGN_KEY_CHECKS
=
1
;
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