Error upgrading 2.0.19 to 2.1.1 - "credits" of relation "smf_log_packages" (Postgre)

Started by Pastroious, February 22, 2022, 01:02:50 PM

Previous topic - Next topic

Pastroious

I got error message:
Overall Progress
41%
Step Progress
56%
Time Elapsed: 0 mins, 57 seconds.
Database Changes
Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made.
Executing upgrade script 2 of 2.
Executing: "Package Manager New Features" (9 of 78 - of this script)
Error!
ERROR: column "credits" of relation "smf_log_packages" contains null values

Column "credits" in table "smf_log_packages"  does not exist in database from version 2.0.19.

SMF upgaraded from 2.0.15 -> 2.0.16 -> 2.0.17 -> 2.0.18 -> 2.0.19
PostgreSQL 14.1,  PHP 8.0.15

Aleksi "Lex" Kilpinen

If it's a new column, and this is happening during the upgrade process - This sounds like a possible PostgreSQL specific bug to me. Going to move this to bug reports pending confirmation one way or another.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Pastroious

Some more informations.

Upgrading from clean installation 2.0.19 to 2.1.1  works flawless

So I did dirty trick - before upgrade process i deleted all records from "log_packages" and upgrade process finished without errors

Aleksi "Lex" Kilpinen

Okay, so we know it's something in log_packages that couldn't be handled correctly.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Matthias

What modifications did you have installed at the 2.0.19 version?
Can you post the contents of the log_packages table here?
Maybe this will help to verify the error.
Quality first

Aleksi "Lex" Kilpinen

Actually ( Thanks albertlast ) it seems this may not be PostgreSQL specific.
There's a column added to a possibly prefilled table, with NOT NULL constraints - This if I understand everything correctly, should crap itself on MySQL just as well. But it doesn't, as MySQL works around this on it's own.

EDIT:
Logged https://github.com/SimpleMachines/SMF2.1/issues/7345
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Pastroious

Quote from: Matthias on February 22, 2022, 02:27:18 PMWhat modifications did you have installed at the 2.0.19 version?
Can you post the contents of the log_packages table here?
Maybe this will help to verify the error.

From DB backup:
COPY public.smf_log_packages (id_install, filename, package_id, name, version, id_member_installed, member_installed, time_installed, id_member_removed, member_removed, time_removed, install_state, failed_steps, themes_installed$
1       recount_member_posts_v1.1.zip   vbgamer45:RecountMemberPosts    Recount Member Posts    1.1     1       Admin   1569156535      0       0       0       1       a:0:{}  1
2       smf_patch_2.0.16.tar.gz smf:smf-2.0.16  SMF 2.0.16 Update       1.0     1       Admin   1587922800      0       0       0       1       a:0:{}  1
3       smf_patch_2.0.17.tar.gz smf:smf-2.0.17  SMF 2.0.17 Update       1.0     1       Admin   1587922931      0       0       0       1       a:0:{}  1
4       smf_patch_2.0.16.tar.gz smf:smf-2.0.16  SMF 2.0.16 Update       1.0     1       Admin   1641747864      0       0       0       2       a:0:{}  1
5       smf_patch_2.0.17.tar.gz smf:smf-2.0.17  SMF 2.0.17 Update       1.0     1       Admin   1641747904      0       0       0       2       a:0:{}  1
6       smf_patch_2.0.18.tar.gz smf:smf-2.0.18  SMF 2.0.18 Update       0.1.0   1       Admin   1641747938      0       0       0       1       a:0:{}  1
7       smf_patch_2.0.19.tar.gz smf:smf-2.0.19  SMF 2.0.19 Update       1.0     1       Admin   1641747977      0       0       0       1       a:0:{}  1
\.

Aleksi "Lex" Kilpinen

Thank you for the report, this should be fixed with #7346 in the next version released.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Matthias

Quality first

Advertisement: