Problems with upgrading database from 2.4.7.1 to 2.4.8.1

Hy,

i have upgrade ojs from 2.4.7.1 to 2.4.8.1 and when i want to do last step - upgrading database - it shows this error:

1075: Incorrect table definition; there can be only one auto column and it must be defined as a key
ADOConnection._Execute(ALTER TABLE published_articles MODIFY COLUMN published_article_id BIGINT NOT NULL AUTO_INCREMENT, false) % line 864, file: adodb.inc.php
ADOConnection.Execute(ALTER TABLE published_articles MODIFY COLUMN published_article_id BIGINT NOT NULL AUTO_INCREMENT) % line 452, file: Installer.inc.php
Installer.executeSQL(ALTER TABLE published_articles MODIFY COLUMN published_article_id BIGINT NOT NULL AUTO_INCREMENT) % line 447, file: Installer.inc.php
Installer.executeSQL(Array[405]) % line 379, file: Installer.inc.php
Installer.executeAction(Array[3]) % line 269, file: Installer.inc.php

I have try to resolve problem but didn’t manage. I don’t know where did go wrong. I would like to ask you if you can give me required settings for the table published_articles: which columns should have, which column is primary key and other settings?

I have fixed problem. I have found options in ojs_schema.xml, backup table published_articles and deleted it, then i have create new table published_articles with settings described in ojs_schema.xml. After that, i have run upgrade of database and everything went well :slight_smile: .

Where is ojs_schema.xml found? Can you explain the process please?

1 Like

what about your data? did u reinserted it?

I have the same problem trying to update the plugin Quick Submmit

ERROR: Upgrade failed: DB: Incorrect table definition; there can be only one auto column and it must be defined as a key

Hi @josuevalrob,

I see you’ve also posted this (along with its resolution) on another thread. Please only post an issue once – otherwise the forum gets cluttered.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like