# Migrate:multisite schlägt bei der zweiten Site fehl, wenn von Grund auf migriert wird

**URL:** <https://meta.discourse.org/t/migrate-multisite-fails-on-second-site-when-migrating-from-scratch/108559>\
**Category:** Bug\
**Created:** [7. Februar 2019 um 03:20 UTC](https://meta.discourse.org/t/migrate-multisite-fails-on-second-site-when-migrating-from-scratch/108559 "2019-02-07T03:20:37Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![jamesh](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jamesh](https://meta.discourse.org/u/jamesh)\
**Post date:** [7. Februar 2019 um 22:04 UTC](https://meta.discourse.org/t/migrate-multisite-fails-on-second-site-when-migrating-from-scratch/108559/10 "2019-02-07T22:04:19Z")

</div>

Thanks for your prompt fix! I should get a chance to test this later today, but no guarantees (running on Australian time here).

However, I’m not entirely convinced that patching every migration is the best option - though you almost certainly should ignore me, since I have no Rails experience. Isn’t it a principled decision to reset the cache at the start of every multisite migration to make sure that previous runs can’t interfere? Or - even better - disable the cache entirely for the migration (possible?), or somehow make every migration entirely separate? It also seems particularly dangerous to me to patch ‘old’ migrations that you know have worked properly (for some value of properly); you really don’t want to make a mistake…

The other fun thing with the current solution is that a random migration is resetting the cache in certain paths, which could easily cause inconsistent failures (i.e. you have old category data, you get the cache reset, everything works later, and if you don’t it fails…).

---

_[View the full topic](https://meta.discourse.org/t/migrate-multisite-fails-on-second-site-when-migrating-from-scratch/108559)._
