UPGRADING OJS 3.0.0 A database error has occurred: Duplicate entry 'tinymceplugin-0-enabled' for key 'plugin_settings_pkey'

Hi @crogers,

You could enable the debug option in config.inc.php, which logs all SQL requests to the console, but I’m not sure if it captures all the queries relating to schema syncing. Start by trying that and seeing where that table is mentioned by name. If that doesn’t capture anything, then you might try configuring a MySQL query log.

Regards,
Alec Smecher
Public Knowledge Project Team

I was able to get it upgraded after backing up the database using mysqldump, then deleting the database, and then restoring it, using the below procedure:

Backup

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

Restore

mysql -u root -p[root_password] [database_name] < dumpfilename.sql

hello when upgread 2.0.4 to 3.0.2 version that
error Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@atharvapub.net to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
plase help me…

Hi @PATEL_SANJAY

Please, create a own thread about your question, posting cross questions just clutters the forum.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi,
I am upgrading database from 2.4.8 to 3.1.1 and I have this error:

[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
-----



(mysql): SELECT TABLE_NAME, CASE WHEN TABLE_TYPE = ‘VIEW’ THEN ‘V’ ELSE ‘T’ END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=SCHEMA()

-----



-----

(mysql): select version()

-----



-----

(mysql): SHOW COLUMNS FROM section_editors

-----



-----

(mysql): SHOW COLUMNS FROM plugin_settings

-----



-----

(mysql): SHOW COLUMNS FROM edit_decisions

-----



-----

(mysql): SHOW COLUMNS FROM static_pages

-----



-----

(mysql): SHOW COLUMNS FROM article_files

-----



-----

(mysql): SHOW COLUMNS FROM article_comments

-----



-----

(mysql): SHOW COLUMNS FROM articles

-----



-----

(mysql): SHOW COLUMNS FROM articles

-----



-----

(mysql): SHOW COLUMNS FROM article_galleys

-----



-----

(mysql): SHOW COLUMNS FROM article_search_objects

-----



-----

(mysql): SHOW COLUMNS FROM article_settings

-----



-----

(mysql): SHOW COLUMNS FROM published_articles

-----



-----

(mysql): SHOW COLUMNS FROM published_articles

-----



-----

(mysql): SHOW COLUMNS FROM article_xml_galleys

-----



-----

(mysql): ALTER TABLE section_editors CHANGE COLUMN journal_id context_id BIGINT(20) NOT NULL

-----



-----

(mysql): ALTER TABLE plugin_settings CHANGE COLUMN journal_id context_id BIGINT(20) NOT NULL

-----



-----

(mysql): ALTER TABLE edit_decisions CHANGE COLUMN article_id submission_id BIGINT(20) NOT NULL

-----



-----

(mysql): ALTER TABLE static_pages CHANGE COLUMN journal_id context_id BIGINT(20) NOT NULL

-----



-----

(mysql): CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id, editor_file_id FROM articles)

-----



1050: Table ‘articles_migration’ already exists
ADOConnection._Execute(CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id,…, false)% line 1051, file: /ojs/lib/pkp/lib/adodb/adodb.inc.php
ADOConnection.Execute(CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id,…)% line 446, file: /ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id,…)% line 441, file: /ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(Array[17])% line 399, file: /ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeAction(Array[3])% line 265, file: /ojs/lib/pkp/classes/install/Installer.inc.php
ERROR: Upgrade failed: DB: Table ‘articles_migration’ already exists

I checked a backup and I don’t have this table.

Regards,
xavi.

I review the output in my log file (3.088.681 lines) and I searched ‘articles_migration’. I found in line 419 with this code:

 ALTER TABLE static_pages CHANGE COLUMN journal_id context_id BIGINT(20) NOT NULL 
   
-----<hr>
-----<hr>
(mysql): CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id, editor_file_id FROM articles) 
   
-----<hr>
-----<hr>
(mysql): CREATE TABLE article_files_migration AS (SELECT * FROM article_files) 
   
-----<hr>
-----<hr>
(mysql): ALTER TABLE article_files CHANGE COLUMN article_id submission_id BIGINT(20) NOT NULL 
   
-----<hr>
-----<hr>
(mysql): RENAME TABLE article_files TO submission_files 
   
-----<hr>
-----<hr>
(mysql): ALTER TABLE article_comments CHANGE COLUMN article_id submission_id BIGINT(20) NOT NULL 

After that, I cannot find when alter this table or RENAME this table… So, yes It is created and when the process try to upgrade in line (3.088.681) exists this error.
Any one has the same problem ?

Regards,
xavi.

Hi @xavi,

It looks like you have the debug option turned on in config.inc.php, which will output all database queries to the browser. If you don’t want that, I’d suggest turning it off.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
I turned on in my config.inc.php because the process not finished and die.
I can see in my log file, create the table articles_migration as I said in log line 429 but not doing rename or alter table.

When the process arrives line 3.088.677 try to create the table again.

Hi @xavi,

The articles_migration table should be created when running the 3.0.0_preupdate.xml upgrade script, fairly early in the migration process, and nothing should attempt to create it again. Is it possible that this table already exists before you run the upgrade process?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
This table it’s only when I am trying to upgrade.
I checked my dump.
I am trying to upgrade again with a new fresh dump and I hope with a new result.

Regards.
Xavi

Hi @herdelafuente,

Can you post this as a new topic? It’s not related to this thread.

Regards,
Alec Smecher
Public Knowledge Project Team

@Victor_Mendez
How do you solve this problem???

how to execute this with pypmyadmin?