So, I accidentally dropped the history table. Yeah, I know. No one can kick me harder than I'm kicking myself.
I did keep a copy. 400meg - now you know why I was trying to clean it out. It had 65k lines in it.
Import function - no joy. File is too damned big. I edited the db to make it much smaller (no records) and that fixed the history but I got the following syntax errors on import no matter what I do with the amount of records in the table be it 0 or 65k:
Static analysis:
Static analysis:
2 errors were found during analysis.
An opening bracket followed by a set of values was expected. (near "ALTER" at position 371)
Unexpected token. (near "ALTER" at position 371)
SQL query:
-- -- Dumping data for table `j25_cbsubs_history` -- INSERT INTO `j25_cbsubs_history` (`id`, `event_type`, `message`, `table_name`, `table_key_id`, `field_changed`, `change_type`, `old_value`, `new_value`, `event_time`, `user_id`, `ip_addresses`, `log_priority`, `log_version`) VALUES -- -- Indexes for dumped tables -- -- -- Indexes for table `j25_cbsubs_history` -- ALTER TABLE `j25_cbsubs_history` ADD PRIMARY KEY (`id`), ADD KEY `user_time_id` (`user_id`,`event_time`,`id`), ADD KEY `table_name_id_time_id` (`table_name`,`table_key_id`,`event_type`,`event_time`,`id`), ADD KEY `event_time_id` (`event_time`,`id`), ADD KEY `event_type_time_id` (`event_type`,`event_time`,`id`), ADD KEY `log_priority_time_id` (`log_priority`,`event_time`,`id`), ADD KEY `ip_addresses_time_id` (`ip_addresses`,`event_time`,`id`), ADD KEY `change_type` (`change_type`)
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ALTER TABLE `j25_cbsubs_history`
ADD PRIMARY KEY (`id`),
ADD KEY `user_time_' at line 14
But - I can now go to the history tab and it seems fine. 0 records and all the columns seem to be there/
Unfortunately, when I click on the PAYMENT CENTER tab under CB Subs I get:
I tried to use the tool that fixes the CB Plugins DB and it shows some issues (in red):
CB plugin "CB Paid Subscriptions" database structure differences:
Table #__cbsubs_history Column id AUTO_INCREMENT attribute is "" instead of "auto_increment"
Table #__cbsubs_history Index PRIMARY does not exist
Table #__cbsubs_history Index user_time_id does not exist
Table #__cbsubs_history Index table_name_id_time_id does not exist
Table #__cbsubs_history Index event_time_id does not exist
Table #__cbsubs_history Index event_type_time_id does not exist
Table #__cbsubs_history Index log_priority_time_id does not exist
Table #__cbsubs_history Index ip_addresses_time_id does not exist
Table #__cbsubs_history Index change_type does not exist
Table #__cbsubs_subscriptions Column previous_autorecurring_type does not exist
The CB plugin "CB Paid Subscriptions" database structure differences can be fixed (adjusted) by clicking here: Click here to fix (adjust) all CB plugin "CB Paid Subscriptions" database differences listed above (you can also Click here to preview fixing (adjusting) queries in a dry-run), but in all cases you need to backup database first as this adjustment is changing the database structure to match the needed structure for the installed version.
And it won't fix anything. When I click on the fix, it keeps on dumping me to this error message:
An error has occurred.
1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
If someone could just give me the correct syntax for building the history table I think I could fix this. Right? I mean it's gotta be a syntax issue on the DB dump that causing the import to fail.
I've tried reinstalling CB and CB Subs hoping that it will rebuild the table but no joy.
Can you please help?
Mark