# What information should be modified in dev after a sql dump

**URL:** <https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787>\
**Category:** Development\
**Created:** [2017年十月25日 19:56 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787 "2017-10-25T19:56:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodeezy](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rodeezy](https://meta.discourse.org/u/rodeezy)\
**Post date:** [2017年十月25日 19:56 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/1 "2017-10-25T19:56:20Z")

</div>

So I just did a sql dump of our prod db into our dev db so we have some good data to work with.

I wanna run a script that changes anything that could mess stuff up for peeps.

All I can think of right now are user emails (so they don’t get notifications when I play around in dev).  
**What should be changed for this?** I see there is a user\_emails table, an email column in the users table, and some other tables and columns having to do with emails. Not sure if changing email in user\_emails and email in users will be enough.

Also would love to hear if there’s things I should change in addition to email.

Thanks!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年十月25日 20:00 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/2 "2017-10-25T20:00:44Z")

</div>

You might just `disable emails` or just don’t configure your dev box to be able to send mail.

---

<div class="post-metadata">

**Author:** ![rodeezy](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rodeezy](https://meta.discourse.org/u/rodeezy)\
**Post date:** [2017年十月25日 20:24 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/3 "2017-10-25T20:24:46Z")

</div>

thanks! how do you `disable emails`?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年十月25日 20:25 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/4 "2017-10-25T20:25:40Z")

</div>

[https://yoursite.com/admin/site\_settings/category/all\_results?filter=disable%20emai](https://yoursite.com/admin/site_settings/category/all_results?filter=disable%20emai)

---

<div class="post-metadata">

**Author:** ![rodeezy](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rodeezy](https://meta.discourse.org/u/rodeezy)\
**Post date:** [2017年十月25日 23:11 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/5 "2017-10-25T23:11:18Z")

</div>

I see it! thanks!  
One more thing for anyone who can help: We just completely overwrote our dev database (no other files), and now our dev domain does not work.  
Where in the db can i update the correct info back to make our domain work again?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年十月25日 23:13 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/6 "2017-10-25T23:13:29Z")

</div>

On a development site, you can do

```
    RAILS_ENV=development bundle exec rake db:drop db:create db:migrate

```

---

<div class="post-metadata">

**Author:** ![rodeezy](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rodeezy](https://meta.discourse.org/u/rodeezy)\
**Post date:** [2017年十月26日 00:15 UTC](https://meta.discourse.org/t/what-information-should-be-modified-in-dev-after-a-sql-dump/72787/7 "2017-10-26T00:15:02Z")

</div>

figured it out!

this line works:  
update topic\_links set domain = regexp\_replace(domain, [old\_domain], [new\_domain])
