NICK WYNJA

Wiping User Data for Local Development

Developing locally? Care about your users data and privacy? When you do a database dump of production data for use in local development, be conscious that you have thousands of people’s names and emails on your machine. If your laptop is stolen, so is your user’s data. To avoid this problem but maintain a healthy amount of real data for use in development run a query like this to obscure their personal information:

update users set name='name', email='email@yourcompany.com' where lower(email) not like ('%yourcompany.com')

This only cleans the data for users other than your team if you used your company email for registration so you don’t kill test accounts. By doing this, you not only protect user information but you avoid silly things like emailing users by accident when building features. Whether it’s in production or local, your users information is of utmost importance and you don’t want to lose their trust.

See all archived log entries »