Post by parkookk » Fri Mar 17, 2023 10:37 pm

Hi,
My website mediasos.co.uk is fully working, however, I get the following error during the upgrade:
Error Code(1075): Incorrect table definition; there can be only one auto column and it must be defined as a key in .../xxxx/system/library/db/mysqli.php on line 24
How can I use the search function and find the table with more than one "AUTO_INCREMENT" and how to change and define it as a key?

Here is a sample of my sql, is this normal?

CREATE TABLE `oc_return_action` (
`return_action_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(64) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `oc_return_action`
--

INSERT INTO `oc_return_action` (`return_action_id`, `language_id`, `name`) VALUES
(1, 1, 'Refunded'),
(2, 1, 'Credit Issued'),
(3, 1, 'Replacement Sent');

ALTER TABLE `oc_return_action`
ADD PRIMARY KEY (`return_action_id`,`language_id`);


CREATE TABLE `oc_return_history` (
`return_history_id` int(11) NOT NULL,
`return_id` int(11) NOT NULL,
`return_status_id` int(11) NOT NULL,
`notify` tinyint(1) NOT NULL,
`comment` text NOT NULL,
`date_added` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Indexes for table `oc_return_history`
--
ALTER TABLE `oc_return_history`
ADD PRIMARY KEY (`return_history_id`);


ALTER TABLE `oc_return_action`
MODIFY `return_action_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `oc_return_history`
--
ALTER TABLE `oc_return_history`
MODIFY `return_history_id` int(11) NOT NULL AUTO_INCREMENT;

Many Thanks
Last edited by parkookk on Mon Mar 20, 2023 6:18 pm, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Sat Mar 18, 2023 12:22 am

So I exported the databse on phpMyAdmin and opened it in DreamWeaver and changed every AUTO_INCREMENT; to AUTO_INCREMENT PRIMARY KEY; and droped all the test database tables in phpMyAdmin and imported it. I got an error with too many primary key. However the upgrade continued and stuck with the following error:
SyntaxError: Unexpected token '<', "Warning"... is not valid JSON parsererror Warning: unlink(..../image/data): Is a directory in ....../install/model/upgrade/1006.php on line 200Warning: unlink(...../download): Is a directory in ...../install/model/upgrade/1006.php on line 200{"success":"Patch 1006 has been applied (7 of 10)","next":"index.php?route=upgrade\/upgrade\/next&step=8"}

Any help would be appreciated. I am an intermediate Python student and build a few websites from html to php since 2004, so I guess if you give me an instruction on how to fix it I can do it. :D

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Sat Mar 18, 2023 1:33 am

I just deleted these two folders and the upgrade was successful.
image/data
download

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Mon Mar 20, 2023 6:21 pm

Back to squar one after re-installing my first compatible extension I got the HTTP ERROR 500

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 111 guests