Failure to pay attention to SKIP POST DEPLOYMENT MIGRATIONS causes problems

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…

1 Like

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

2 Likes

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.

2 Likes

But strange. Recovering from failed/partially applied upgrade seems to have the same issue and it appears to be a standard install.

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

1 Like

Seems to be related to DEV: Re-add polymorphic bookmark columns (#16261) · discourse/discourse@8040b95 · GitHub

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.

2 Likes

Wow. That seems to explain it.

Any update on this?

Mine is coming up with the same issue.

How would i copy this git into my discourse?