Error 1075 during the upgrade of 3.0.3.1 to 3.0.3.8
Posted: 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
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