# Uninstalling a plugin on multisite

**URL:** https://meta.discourse.org/t/uninstalling-a-plugin-on-multisite/223743
**Category:** Self-hosting
**Tags:** multisite
**Created:** [April 8, 2022, 5:05pm UTC](https://meta.discourse.org/t/uninstalling-a-plugin-on-multisite/223743 "2022-04-08T17:05:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [April 8, 2022, 5:05pm UTC](https://meta.discourse.org/t/uninstalling-a-plugin-on-multisite/223743/1 "2022-04-08T17:05:09Z")

</div>

This is quite an edge case, might be a bug, and I am curious if there is a good solution for this.  
@sam I’m tagging you because if anyone should know, I it’s probably you.

Consider a multisite installation.

1. Forum A is added to the multisite
2. A plugin that modifies the database is installed (for instance the chat plugin which adds chat\_enabled to user\_options)
3. Migrations are run and columns are added to some tables on forum A
4. The plugin is removed, columns will remain
5. Forum B is added to the multisite
6. We now have forum A and forum B on a single multisite with different column definitions in `user_options`
7. `multisite:seed_fu` runs into problems (I think because of ActiveRecord model caching?)

```plaintext
#<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column user_options.chat_enabled does not exist
LINE 1: ...lendar", "user_options"."oldest_search_log_date", "user_opti...

```

---

<div class="post-metadata">

### Author: ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)
#### Post date: [April 8, 2022, 5:52pm UTC](https://meta.discourse.org/t/uninstalling-a-plugin-on-multisite/223743/2 "2022-04-08T17:52:12Z")

</div>

I’m pretty sure I also ran into this problem when I recently tried to add a new site to a multisite. Thank you for articulating it.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [September 21, 2022, 12:55am UTC](https://meta.discourse.org/t/uninstalling-a-plugin-on-multisite/223743/3 "2022-09-21T00:55:35Z")

</div>

Yeah this is a bit of a nightmare, you are going to need to run cleanup by hand here.

It is critical to have schema parity in all multisite setups.
