# Failure to pay attention to SKIP POST DEPLOYMENT MIGRATIONS causes problems

**URL:** https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906
**Category:** Support
**Created:** [March 24, 2022, 7:37pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906 "2022-03-24T19:37:30Z")
**Posts on this page:** 8
**Page:** 1

<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: [March 24, 2022, 7:37pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/1 "2022-03-24T19:37:30Z")

</div>

I have a multisite instance in which a bunch of databases failed to migrate because

```
   PG::DuplicateColumn: ERROR: column "bookmarkable_id" of relation "bookmarks" already exists    

```

maybe I should go delete that column from that table in those databases?

looks like it was because previous migrations hadn’t run due to SKIP\_POST\_DEPLOYMENT\_MIGRATIONS being set and previous migrations hadn’t finished.

I’ll delete this when I confirm that’s true…

---

<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: [March 24, 2022, 7:51pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/2 "2022-03-24T19:51:24Z")

</div>

@martin any ideas, may be related to the recent refactors?

---

<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: [March 24, 2022, 8:00pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/3 "2022-03-24T20:00:56Z")

</div>

Sorry for the false alarm. I so hate when I do this.

The issue was that I had `SKIP_POST_DEPLOYMENT_MIGRATIONS: 1` set and then didn’t run `multisite:migrate`. After I did a `SKIP\_POST\_DEPLOYMENT\_MIGRATIONS=- multisite:migrate’ I was then able to bootstrap.

I just need to fix my tooling for multisite to run the migration after cranking up the new semi-migrated container.

---

<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: [March 24, 2022, 9:28pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/4 "2022-03-24T21:28:14Z")

</div>

But strange. [Recovering from failed/partially applied upgrade](https://meta.discourse.org/t/recovering-from-failed-partially-applied-upgrade/221924) seems to have the same issue and it appears to be a [standard install](https://meta.discourse.org/t/142537?silent=true).

---

<div class="post-metadata">

### Author: ![luxaritas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luxaritas/32/254171_2.png) [@luxaritas](https://meta.discourse.org/u/luxaritas)
#### Post date: [March 24, 2022, 9:32pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/5 "2022-03-24T21:32:20Z")

</div>

I would’ve replied to this post, but figured it was the same symptom of a different problem. 🙂 I admittedly don’t know enough to confirm either way…

---

<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: [March 24, 2022, 10:08pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/6 "2022-03-24T22:08:47Z")

</div>

Seems to be related to [DEV: Re-add polymorphic bookmark columns (#16261) · discourse/discourse@8040b95 · GitHub](https://github.com/discourse/discourse/commit/8040b95e8c4abeab1ab9fe50826f92c52995a814)

> This commit is a redo of 2f1ddadff7dd47f824070c8a3f633f00a27aacde  
> which we reverted because it blew up an internal CI check. I looked  
> into it, and it happened because the old migration to add the bookmark  
> columns still existed, and those columns were dropped in a post migrate,  
> so the two migrations to add the columns were conflicting before  
> the post migrate was run.

---

<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: [March 25, 2022, 8:34am UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/7 "2022-03-25T08:34:14Z")

</div>

Wow. That seems to explain it.

---

<div class="post-metadata">

### Author: ![Nick\_Tomlinson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_tomlinson/32/282728_2.png) [@Nick\_Tomlinson](https://meta.discourse.org/u/Nick_Tomlinson)
#### Post date: [April 1, 2022, 10:13pm UTC](https://meta.discourse.org/t/failure-to-pay-attention-to-skip-post-deployment-migrations-causes-problems/221906/8 "2022-04-01T22:13:46Z")

</div>

Any update on this?

Mine is coming up with the same issue.

How would i copy this git into my discourse?
