[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: upgrades and database integrity.





On Fri, Jan 8, 2010 at 12:52 PM, Alvin Starr <..hidden..> wrote:

>
>
>
> Ok, let's start by explaining the problem.  The short version is that
> if the problem description doesn't provide for you enough information
> for you to solve it you would probably be best off with professional
> tech support.
I was hoping that the answer would be "just run this little obscure
script that is completley undocumented" and life would be good.
I got the feeling that I may be in for an ugly walk through the database
and trying to figure out what I need to fix.

If you need more detailed information, feel free to ask.  I would highly recommend backing everything up before starting.


The database dump is 115K lines. There is about 6 years of data in the
system.

I would argue that all database driven applications  should have a
simple flat file export/import that dis-entangles the funny database
issues on export and then tangles them back up on import and does an
intregity check. It also means that you can make huge database structure
changes and not have to restrict changes to the level of what can be
fixed with a few sql statements.

Well, if that was supported it wouldn't help in this case.  The issue is that SQL-Ledger (and hence earlier versions of LedgerSMB) have inadequate constraints and consequently you get really nasty issues with data ambiguity.  At least when manually trying to fix it you can identify the duplicate id's relatively quickly.  If trying to automatically disentangle I would be concerned about automating fixes that don't fix the problem but make it harder to track down.

Best Wishes,
Chris Travers