>Hi! > > On Wed, Aug 11, 2010 at 12:47 PM, Piper, Adam <[email protected]> wrote: > > There are a number of possible solutions we have discussed, with the > > example being wiki pages: > > > > 1. Versions < 1 > > > > Alter the DELETE to be an UPDATE which decrements the version to the > > next available number below 1. Alter the SELECT to take only items with > > versions above 0. > > Wouldn't it be easier just to negate ID, not to search for next > available number? Delete can be then just one simple UPDATE statement. > This means that information about deletion status would be stored in > highest ID bit. >
I had considered simply negating the number, however when testing this solution I found that this resulted in collisions if the same version number is deleted twice: Versions: 1, 2 Delete latest version: -2, 1 Edit/Save version 1: -2, 1, 2 Delete latest version: -2, 1, -2 (collision) The SQL I provided in my suggestion was written specifically to avoid this kind of situation. > What suggest that this could be normalized in another field. > > > 2. "deleted" column, version skipping > > Yes. So this is then just a question: should be normalize or should we not. > > For me ID mingling is ugly. It is not conceptually clean concept. Perhaps the 3rd option is the cleanest, then? Regards, Adam Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.
