PostgreSQL migration to 6.0.6 - wrong sequences names

Moderator: crythias

Post Reply
petrj
Znuny newbie
Posts: 5
Joined: 30 Dec 2017, 18:29
Znuny Version: 6.0.*
Company: UOL

PostgreSQL migration to 6.0.6 - wrong sequences names

Post by petrj »

When I try to migrate OTRS with PostgreSQL to 6.0.6 I got this errors:

Code: Select all

Requirement check for: Upgrade database structure ...
Error: The following sequences with possible wrong names have been found. Please rename them manually.
article_attachment_id_seq
article_plain_id_seq
article_id_seq1
PostgreSQL info about sequence ...

Code: Select all

otrs=# SELECT * FROM article_attachment_id_seq;
 last_value | log_cnt | is_called 
------------+---------+-----------
          1 |       0 | f
(1 row)

Code: Select all

otrs=# \d+ article_attachment_id_seq
                 Sequence "public.article_attachment_id_seq"
  Type  | Start | Minimum |       Maximum       | Increment | Cycles? | Cache 
--------+-------+---------+---------------------+-----------+---------+-------
 bigint |     1 |       1 | 9223372036854775807 |         1 | no      |     1
Owned by: public.article_data_mime_attachment.id
A realy don't know how to fix this

I found similar topic here - viewtopic.php?t=38482

I use OTRS on Ubuntu with PostgreSQL 10, upgrading from 6.0.4
OTRS 6.0.12, Ubuntu, PostgreSQL 11, LDAP
PeterHG
Znuny newbie
Posts: 1
Joined: 18 Oct 2018, 19:04
Znuny Version: 6.04x
Real Name: Peter Herdman-Grant

Re: PostgreSQL migration to 6.0.6 - wrong sequences names

Post by PeterHG »

I know it's been more than six months, did you solve this problem? I am seeing the exact same "sequences with possible wrong names" errors! :(
petrj
Znuny newbie
Posts: 5
Joined: 30 Dec 2017, 18:29
Znuny Version: 6.0.*
Company: UOL

Re: PostgreSQL migration to 6.0.6 - wrong sequences names

Post by petrj »

Hello Peter,

yesterday I finally upgraded OTRS to 6.0.12. And because "sequence check" had moved to to SupportDataCollecor - https://github.com/OTRS/otrs/blob/87629 ... quences.pm , the migration is now possible.

I renamed the sequences like this... in psql console

Code: Select all

otrs=# \d+ article_attachment_id_seq
Owned by: public.article_data_mime_attachment.id

otrs=# ALTER SEQUENCE article_attachment_id_seq RENAME TO article_data_mime_attachment_id_seq;
ALTER SEQUENCE

otrs=# \d+ article_data_mime_attachment_id_seq
Owned by: public.article_data_mime_attachment.id

Code: Select all

otrs=# \d+ article_plain_id_seq
Owned by: public.article_data_mime_plain.id

otrs=# ALTER SEQUENCE article_plain_id_seq RENAME TO article_data_mime_plain_id_seq;
ALTER SEQUENCE

otrs=# \d+ article_data_mime_plain_id_seq;
Owned by: public.article_data_mime_plain.id

Code: Select all

otrs=# \d+ article_id_seq
Owned by: public.article_data_mime.id

otrs=# ALTER SEQUENCE article_id_seq RENAME TO article_data_mime_id_seq;
ALTER SEQUENCE

Code: Select all

otrs=# \d+ article_id_seq1
Owned by: public.article.id

otrs=# ALTER SEQUENCE article_id_seq1 RENAME TO article_id_seq;
ALTER SEQUENCE
Hope this help you
OTRS 6.0.12, Ubuntu, PostgreSQL 11, LDAP
Post Reply