التعافي من ترقية فاشلة/تم تطبيقها جزئيًا

hum… :thinking: that’s weird, I’ve setup a fresh 2.9.0.beta2, commit 5374e587a3,
…and rebuild to 2.9.0.beta3 latest (commit 6555f0c11b) without any issue…

إعجاب واحد (1)

Maybe the issue was somewhere before that?

I’m guessing that manually deleting the extra stuff may be the way to go.

:weary: I have to admit that I don’t fully grasp what’s going on. I’m guessing somehow Nick is missing the db/post_migrate/20220107014925_drop_bookmark_polymorphic_columns.rb because of this commit ?

Was there any output for the drop column commands?

I’ve just tried the commands again and after ./launcher enter app i get this error

Error response from daemon: Container 69b56d9734c3654d0b0e0661ff612c1020781191d3ec1d866e453747df03fcdf is not running

New issue?

Managed to start app with sudo ./launcher enter app

This is my input:

root@discourseSwingrz:~# cd /var/discourse
root@discourseSwingrz:/var/discourse# ./launcher enter app
x86_64 arch detected.
Error response from daemon: Container 69b56d9734c3654d0b0e0661ff612c1020781191d3ec1d866e453747df03fcdf is not running
root@discourseSwingrz:/var/discourse# sudo ./launcher start app
x86_64 arch detected.

starting up existing container
+ /usr/bin/docker start app
app
root@discourseSwingrz:/var/discourse# cd /var/discourse
root@discourseSwingrz:/var/discourse# ./launcher enter app
x86_64 arch detected.
root@discourseSwingrz-app:/var/www/discourse# su - postgres
postgres@discourseSwingrz-app:~$ psql
psql (13.2 (Debian 13.2-1.pgdg100+1))
Type "help" for help.

postgres=# ALTER TABLE bookmarks 
postgres-# DROP COLUMN bookmarkable_id
postgres-# DROP COLUMN bookmarkable_type;
ERROR:  syntax error at or near "DROP"
LINE 3: DROP COLUMN bookmarkable_type;
        ^
postgres=# 

I appreciate all your help with this guys :slight_smile:

إعجاب واحد (1)

Not sure if I’m entering @pfaffman code correctly?

Could you

  • make a backup :sweat_smile:
  • try
ALTER TABLE bookmarks 
DROP COLUMN bookmarkable_id;
إعجاب واحد (1)

like so?

Backup done.
Output file is in: /var/www/discourse/public/backups/default/swingrz-2022-04-03-101750-v20220316150247.tar.gz

root@discourseSwingrz-app:/var/www/discourse# ALTER TABLE bookmarks 
bash: ALTER: command not found
root@discourseSwingrz-app:/var/www/discourse# su - postgres
postgres@discourseSwingrz-app:~$ psql
psql (13.2 (Debian 13.2-1.pgdg100+1))
Type "help" for help.

postgres=# ALTER TABLE bookmarks 
postgres-# DROP COLUMN bookmarkable_id;
ERROR:  relation "bookmarks" does not exist
postgres=# 
إعجاب واحد (1)

Could you edit your app.yml, uncomment the version line (beware of the indentation) to
version: cd7ce52138bed391d5efc56366e7a6517a6079e7
and rebuild

Cant seem to find the version line, Ben ?

إعجاب واحد (1)
 ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

Is this it?

إعجاب واحد (1)

:+1:

so replace #version: tests-passed

With version: cd7ce52138bed391d5efc56366e7a6517a6079e7

Then /var/discourse/launcher rebuild app

إعجاب واحد (1)

Just making sure this is correct before i rebuild

  ## Which Git revision should this container use? (default: tests-passed)
  version: cd7ce52138bed391d5efc56366e7a6517a6079e7

do i have to indent it again?

(beware of the indentation)

Now the code looks like this

## Which Git revision should this container use? (default: tests-passed)
   version: cd7ce52138bed391d5efc56366e7a6517a6079e7

Rebuild?

إعجاب واحد (1)

Nope first one is good

thanks, Ben

Will rebuild now

Should be aligned with the #

إعجاب واحد (1)
## Which Git revision should this container use? (default: tests-passed)
version: cd7ce52138bed391d5efc56366e7a6517a6079e7
إعجاب واحد (1)

Like your first one:

إعجاب واحد (1)

Ben, It worked! :grin:

Thank you so much for your time & effort in assisting me!

(please PM me so i can send you some coffee or beer money)

إعجابَين (2)