<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 10 Aug 2008, at 3:19 PM, Ernst Plüss wrote:</div><blockquote type="cite">With the help of a GUID and a timestamp of the last write access in every table it would be easy to synchronize Databases. If you want to synchronize only certain elements like varialbes, nodes, users, configuration etc. modules could provide a hook which<br class="Apple-interchange-newline"></blockquote>Not all tables have timestamps, and it would require adding a whole mess of extra columns.<br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><ul><li>just lists the db table to snychronize</li><li>gets the result of db compaire and let the user decide what will be pushed to the other side.</li></ul></span></blockquote></div>That's a lot of functionality, considering the weird merging of tables, and additional foreign keys. Take for example<div>a simple single -> multi relationship. You'd have to compare the bunch of them, and understand how to generate them all.</div><div><br></div><div>All this stuff is already in most of the _load functions. It's also a LOT easier to compare 2 objects to each other </div><div>(take the diff module for instance).<br></div><div><br></div><div>Also, the db updates then get related very directly to the schema the modules export.</div><div><br></div><div><blockquote type="cite">Both things could be handled by the db_query() function, to make sure no one forgets to touch the access timestamp and creates accurate GUID's.<br></blockquote><br></div><div>I think that perhaps db_query is too low a level for this, as that would add extra cycles on every single query done to the database, and probably</div><div>also parsing the query (or changing all the db_query calls in core with extra parameters).</div><div><br></div><div>And it's also not that hard to make sure the access stamp isn't changed, and is only related to nodes.</div></body></html>