Upgrade error from 3.2.1-4 to 3.3.0-5

Dear @Vitaliy @NateWr (cc @ahmed.maxamed),

Finally I successfully upgraded from version ‘OJS-3.2.1-4’ to ‘OJS-3.3.0-5’

Here is the solution:
$ psql ojsdatabase;
ojsdatabasenew = # \ d submission_files (as directed)
Did not find any relation named “submission_files”.

However, adding the name of the complete table:
ojsdatabase = # \ d public.submission_files
Table “public.submission_files”
Column | Type | Modifiers
-------------------- + ----------------------------- + ------------------------------------------------- -----------------------
file_id | bigint | not null default nextval (‘public.article_files_file_id_seq’ :: regclass)
revision | bigint | not null
source_file_id | bigint |
source_revision | bigint |
submission_id | bigint | not null
file_type | character varying (255) | not null
file_size | bigint | not null
original_file_name | character varying (127) |
file_stage | bigint | not null
viewable | smallint |
date_uploaded | timestamp without time zone | not null
date_modified | timestamp without time zone | not null
assoc_id | bigint |
genre_id | bigint |
direct_sales_price | character varying (255) |
sales_type | character varying (255) |
uploader_user_id | bigint |
assoc_type | bigint |
Indexes:
“article_files_pkey” PRIMARY KEY, btree (file_id, revision)
“submission_files_stage_assoc” btree (file_stage, assoc_type, assoc_id)
“submission_files_submission_id” btree (submission_id)

Note that the primary key “article_files_pkey” should be changed to “submission_files_pkey”

But still, during the update attempt, other keys needed to be changed, as follows
From: “public.article_files_file_id_seq”
To: “public.submission_files_file_id_seq”

CREATE SEQUENCE public.article_files_file_id_seq (alter to submission)
START WITH 1
INCREMENT BY 1
IN MINVALUE
NO MAXVALUE
CACHE 1;

Lower:
ALTER TABLE public.article_files_file_id_seq OWNER TO ojsdbadmin;
To: public.submission_files_id_seq

And since we got here, we got the rest right:
ALTER SEQUENCE public.article_files_file_id_seq OWNED BY public.submission_files.file_id;
To: public.submissions_files_file_id_seq

ALTER TABLE ONLY public.submission_files ALTER COLUMN file_id SET DEFAULT nextval (‘public.article_files_file_id_seq’ :: regclass);
To: public.submission_files_file_id_seq

ALTER TABLE ONLY public.submission_files
ADD CONSTRAINT article_files_pkey PRIMARY KEY (file_id, revision);
To: submission_files_pkey

In short, where it is declared as article, referencing the submission_files table, it should be changed to submission

I now have the site running on the current version OJS-3.3.0-5
I just didn’t understand the reason why I was able to migrate from OJS3.2.1-2 to OJS-3.3.0-3 without these problems from the [article] declarations and after upgrading to version 3.2.1-4 they appeared.

Thanks for the great help of the OJS team, always willing to make the system even better.

We have been users of OJS (also from other platforms developed by PKP.org) since the early 2000s, we have also disseminated this system to several interested parties, due to the great success we have been publishing free and quality scientific articles to the world.
Best regards,
Augusto Torres
Computer Support Analyst
CLE-UNICAMP
Publicações Eletrônicas - CLE/UNICAMP

5 Likes