by jvinolas » Wed May 11, 2011 11:25 am
I think I didn't explain so well.
What I mean is that as I enable history after records have been introduced, modifications to those records create a record in related history table (and the history table itself), but as there is no 'initial' record, when I go to history table, I can't view the modifications that where done from that 'initial' record.
I can't view the green and red field modifications on history table. Those 'green and red' modifications will be seen if I introduce another modification (3rd one) to the same record, as then I will have 2 entries on history table and your code can show modifications between both.
That doesn't happen with new records as they will get the 'initial' insert into history table and I will be able to see the modifications when I modify the record as your code will get differences from both records.
So, in the end, now I'm not able to track first modification from original record as I enabled history after those records where inserted into mysql database.
One solution I'm looking at is to export all data, dump table date, activate history and create a new import function for that data so it will get initial insert into history. Another way will be to look into all registers and call your history insert function to get it done for the first time.
Have you got a better way of inserting all those initial history registers?