[development] Solving the dev->staging->live problem

Adrian Rossouw adrian at bryght.com
Sun Aug 10 15:07:49 UTC 2008


On 10 Aug 2008, at 3:19 PM, Ernst Plüss wrote:
> 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
Not all tables have timestamps, and it would require adding a whole  
mess of extra columns.
> just lists the db table to snychronize
> gets the result of db compaire and let the user decide what will be  
> pushed to the other side.
That's a lot of functionality, considering the weird merging of  
tables, and additional foreign keys. Take for example
a simple single -> multi relationship. You'd have to compare the bunch  
of them, and understand how to generate them all.

All this stuff is already in most of the _load functions. It's also a  
LOT easier to compare 2 objects to each other
(take the diff module for instance).

Also, the db updates then get related  very directly to the schema the  
modules export.

> 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.

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
also parsing the query (or changing all the db_query calls in core  
with extra parameters).

And it's also not that hard to make sure the access stamp isn't  
changed, and is only related to nodes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080810/9a24eec3/attachment.htm 


More information about the development mailing list