upgrade to 3.1.1

Moderator: crythias

Post Reply
cici6160
Znuny newbie
Posts: 24
Joined: 29 Sep 2011, 20:55
Znuny Version: 3.3.8

upgrade to 3.1.1

Post by cici6160 »

I'm getting the following error when running the first sql script (against mysql) >> cat scripts/DBUpdate-to-3.1.mysql.sql | mysql -p -f -u root otrs

ERROR 1062 (23000) at line 187: Duplicate entry '656-Seen-8' for key 'ticket_flag_per_user'

Any ideas?

Thanks in advance
OTRS 3.3.8 on CentOS 6.5 with MySQL database
dddougal
Znuny newbie
Posts: 1
Joined: 19 Feb 2012, 00:38
Znuny Version: basic
Real Name: ste
Contact:

Re: upgrade to 3.1.1

Post by dddougal »

you have used that entry before, they all have to be unique
cici6160
Znuny newbie
Posts: 24
Joined: 29 Sep 2011, 20:55
Znuny Version: 3.3.8

Re: upgrade to 3.1.1

Post by cici6160 »

This resolved my issue - not sure how it happened though:

mysql -u root -p
use otrs
select * from ticket_flag where ticket_id=656;
delete from ticket_flag where ticket_id=656 and create_by=8 LIMIT 1;
OTRS 3.3.8 on CentOS 6.5 with MySQL database
marv
Znuny newbie
Posts: 10
Joined: 16 Feb 2012, 14:27
Znuny Version: 3.0

Re: upgrade to 3.1.1

Post by marv »

I've got the same problem.

although i've got a lot of duplicate entries.
my "solution" was to uncomment the line 187 in the update-sql script.

any ideas what the sideeffects might be?
OTRS Live: 3.0
OTRS Test: 3.1.1
Windows 2k3
Apache/MySQL
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: upgrade to 3.1.1

Post by Giulio Soleni »

Same problem... same questions :)
For me the error is the following:

# cat scripts/DBUpdate-to-3.1.mysql.sql | mysql -p -f -u root otrs
Enter password:
ERROR 1062 (23000) at line 187: Duplicate entry '292-Seen-31' for key 1

and looking at the table actually I have a duplicate entry:

mysql> select * from ticket_flag where ticket_id = '292';
+-----------+------------+--------------+---------------------+-----------+
| ticket_id | ticket_key | ticket_value | create_time | create_by |
+-----------+------------+--------------+---------------------+-----------+
| 292 | Seen | 0 | 2011-08-31 14:32:15 | 1 |
| 292 | Seen | 1 | 2011-08-31 17:05:12 | 29 |
| 292 | Seen | 0 | 2011-08-31 16:57:44 | 30 |
| 292 | Seen | 1 | 2011-09-01 09:40:26 | 31 |
| 292 | Seen | 1 | 2011-09-01 09:40:26 | 31 |

+-----------+------------+--------------+---------------------+-----------+
5 rows in set (0.00 sec)

Anyone may give some hints at least about ticket_flag table..? what's this table usage in the otrs db?

thank you
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
imant1
Znuny newbie
Posts: 2
Joined: 08 Mar 2012, 13:51
Znuny Version: OTRS3
Real Name: Rachel Abraham
Company: RachelCute

Re: upgrade to 3.1.1

Post by imant1 »

anyone know how to revert back to older version?

I've error while connecting to mysql..
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: upgrade to 3.1.1

Post by jojo »

you can not revert back to an old version
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
LarryLevi
Znuny newbie
Posts: 1
Joined: 09 Mar 2012, 11:11
Znuny Version: Version3
Real Name: Larry Levi
Company: Freelance
Location: Chicago, IL

Re: upgrade to 3.1.1

Post by LarryLevi »

Same problem here. I can't get the version 3.1.1 working right. Since it is impossible to revert back to the old version, it would probably be better to reinstall the older version, right? Version 3.0 worked like a charm for me.
masmiskun
Znuny newbie
Posts: 1
Joined: 09 Mar 2012, 20:10
Znuny Version: light

Re: upgrade to 3.1.1

Post by masmiskun »

can i downgrade theversion? i know upgrade is no question.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: upgrade to 3.1.1

Post by jojo »

you can not downgrade
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
earwax
Znuny newbie
Posts: 43
Joined: 07 Dec 2010, 23:54
Znuny Version: 3.0.11
Location: Seattle, WA
Contact:

Re: upgrade to 3.1.1

Post by earwax »

I got a very similar error when accidentally upgrading from OTRS 3.0.11 to OTRS 3.1.2. I mistaked OTRS 3.1.2 for OTRS 3.0.12. Fortunately I backed up everything and was able to revert back, but I admit I was looking forward to making the jump. Hopefully OTRS can fix this duplicate entry problem.
marv wrote:I've got the same problem.

although i've got a lot of duplicate entries.
my "solution" was to uncomment the line 187 in the update-sql script.

any ideas what the sideeffects might be?
I am not sure what commenting out line 187 would do in the SQL script file, but I would not do it unless OTRS officially says it is safe to do so.
jojo wrote:you can not downgrade
jojo is correct. When the SQL script file failed with that duplicate entry error, the script has already created new tables and rows. You have essentially modified the OTRS DB.

Anyhow, let this be a lesson: BACKUP, BACKUP, BACKUP!!!! :)
OTRS 3.0.12
Ubuntu Linux 10.04
MySQL
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: upgrade to 3.1.1

Post by ferrosti »

As far as I can see, this table 'ticket_flag' holds information about seen tickets only.
In case I´d run into this error I´d empty the table BEFORE running the mySQL update script, run the script and afterwards run $OTRS_HOME/bin/otrs.MarkTicketAsSeen.pl.
The only disadvantage I see with this is that all tickets will be marked as seen, so this feature would only apply to new tickets. But I could live with it.

I do not have a copy of 3.1 here to have a look at it. I´d rather recommend to fix this kind of bug, which should not be too difficult, but xxx usually takes some time on bug fixing. Anyhow, you should open a bug report for it, in case there is none opened yet.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
marv
Znuny newbie
Posts: 10
Joined: 16 Feb 2012, 14:27
Znuny Version: 3.0

Re: upgrade to 3.1.1

Post by marv »

I agree with you that ignoring this is not the best way to deal with it.

This is the way I went:
1) Comment line 187 in DBUpdate-to-3.1-mysql.sql:
#ALTER TABLE ticket_flag ADD CONSTRAINT ticket_flag_per_user UNIQUE INDEX (ticket_id, ticket_key, create_by);

2) do the update.
3) dump the table ticket_flag
4) empty table ticket_flag
5) execute the ALTER TABLE statement
6) import the table dump

At step 6) you will get errors because you're not allowed to import duplicates. I just skipped them and imported only the unique entries of the dump.
OTRS Live: 3.0
OTRS Test: 3.1.1
Windows 2k3
Apache/MySQL
Post Reply