[development] multisite shared table upgrade enhancements (was what would be more useful)

Moshe Weitzman weitzman at tejasa.com
Sun Feb 26 06:01:06 UTC 2006


Daniel Convissor wrote:
> On Fri, Feb 24, 2006 at 02:18:46PM -0500, Moshe Weitzman wrote:
>> the only solution that is even somewhat workable in my small brain is to 
>> warn the user and then upgrade all the sites at once
> 
> Here are my thoughts at this moment:
> 
> * Gather the $db_prefix settings from sites/*/settings.php (as previously 
> mentioned).
> 
> * Add a function to update.php called something like update_db_query() 
> that replaces db_query() for the update process.  This function does the 
> table name prefixing then stores an MD5 hash of the prefixed SQL.  Save 
> that hash in an array via variable_set().  Before executing a query, check 
> if the hash exists yet or not.  If it exists, move on, otherwise, run the 
> query.
> 
> Sound reasonable?  Other ideas?
> 
> --Dan
> 

sounds reasonable. not sure if it would totally fix this problem but it 
would help. i suggest trying it and then folks will update their multi-site 
shared DBs and let us know ... i was wondering how onerous it would be to 
require update writers to craft their updates such that they did the right 
thing if run a few times. that would cover us for multi_site shared i think.


More information about the development mailing list