الفشل في الانتباه إلى SKIP POST DEPLOYMENT MIGRATIONS يسبب مشاكل

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)

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

إعجابَين (2)

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)

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)

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)

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?