Whilst upgrading a site from EE1 to EE2.5.5 I have been doing a lot of editing the database in Sequel Pro. All of which seems to be working fine so far...
But I'm having a problem with a straightforward channel entries tag to display past entries from a specific channel (id=2) all other channels work, and if I add show_future_entries="yes" to the parameters it works for channel 2 (and shows the future entries).
In my investigations I discovered that in the exp_channels table the row for channel_id 2 has a 0 for total_entries and last_entry_date but there are 39 rows in exp_channel_data and exp_channel_titles with a channel_id of 2 (and they all match up and have the same number of rows in total).
If I add a new entry in channel 2 the exp_channels table row doesn't update, but does for other channels.
I tried editing the field directly in Sequel Pro to add the correct total_entries and last_entry_date. But when I post a new entry in channel 2 it reverts those 2 fields to 0.
Update: I just tried adding another new entry and it is updating the entry count now and channel entries tag queries show the new entries with a date before now, but still don't show the older ones.
It seems to be the the older entries in the channel that I inserted directly (along with titles in the exp_titles table) didn't update the exp_channels table and that's the problem. Why it should matter I can't work out, as there aren't any fields in there that are related to entries.
So does anyone know what other table is updated when you add a new entry that is breaking the relationship?
I realise that I must have screwed something up during my time editing the database directly but is there a way to re-synch the exp_channel table and why is this issue preventing the display of past entries?