Author: jstroomer Date: 2010-03-11 15:33:18 +0100 (Thu, 11 Mar 2010) New Revision: 41345
Modified: CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.5_to_1.6.txt CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.6_to_1.7.txt CMSContainer/trunk/CMSContainer/migration/migration_1.5_to_1.6.txt CMSContainer/trunk/CMSContainer/migration/migration_1.6_to_1.7.txt Log: Improvements to migration script Modified: CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.5_to_1.6.txt =================================================================== --- CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.5_to_1.6.txt 2010-03-11 13:53:17 UTC (rev 41344) +++ CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.5_to_1.6.txt 2010-03-11 14:33:18 UTC (rev 41345) @@ -65,13 +65,13 @@ * Wait for finishing startup (editors should work) * Stop CMSC 1.6 * Execute the following script on database: -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_urls; -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_attachments; -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_images; +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_urls WHERE number NOT IN ( SELECT number FROM mm_assetelement ); +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_attachments WHERE number NOT IN ( SELECT number FROM mm_assetelement ); +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_images WHERE number NOT IN ( SELECT number FROM mm_assetelement ); -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_urls; -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_attachments; -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_images; +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_urls WHERE number NOT IN ( SELECT number FROM live_assetelement ); +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_attachments WHERE number NOT IN ( SELECT number FROM live_assetelement ); +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_images WHERE number NOT IN ( SELECT number FROM live_assetelement ); --- End script --- * * Modified: CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.6_to_1.7.txt =================================================================== --- CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.6_to_1.7.txt 2010-03-11 13:53:17 UTC (rev 41344) +++ CMSContainer/branches/b1_7/CMSContainer/migration/migration_1.6_to_1.7.txt 2010-03-11 14:33:18 UTC (rev 41345) @@ -92,13 +92,13 @@ --- Start script --- * First start CMSC 1.6 for the first time (it needs to create the navigationitem tables!) * Execute the following script on database: -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_page; -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_rssfeed; -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_pagealias; +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_page WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_rssfeed WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_pagealias WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_page; -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_rssfeed; -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_pagealias; +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_page WHERE number NOT IN ( SELECT number FROM live_navigationitem ); +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_rssfeed WHERE number NOT IN ( SELECT number FROM live_navigationitem ); +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_pagealias WHERE number NOT IN ( SELECT number FROM live_navigationitem ); --- End script --- Modified: CMSContainer/trunk/CMSContainer/migration/migration_1.5_to_1.6.txt =================================================================== --- CMSContainer/trunk/CMSContainer/migration/migration_1.5_to_1.6.txt 2010-03-11 13:53:17 UTC (rev 41344) +++ CMSContainer/trunk/CMSContainer/migration/migration_1.5_to_1.6.txt 2010-03-11 14:33:18 UTC (rev 41345) @@ -65,13 +65,13 @@ * Wait for finishing startup (editors should work) * Stop CMSC 1.6 * Execute the following script on database: -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_urls; -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_attachments; -INSERT INTO mm_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_images; +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_urls WHERE number NOT IN ( SELECT number FROM mm_assetelement ); +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_attachments WHERE number NOT IN ( SELECT number FROM mm_assetelement ); +INSERT INTO mm_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from mm_images WHERE number NOT IN ( SELECT number FROM mm_assetelement ); -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_urls; -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_attachments; -INSERT INTO live_assetelement select number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_images; +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_urls WHERE number NOT IN ( SELECT number FROM live_assetelement ); +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_attachments WHERE number NOT IN ( SELECT number FROM live_assetelement ); +INSERT INTO live_assetelement SELECT number,otype,owner,creationdate,lastmodifieddate,publishdate,expiredate,lastmodifier,creator,use_expirydate,title,description,m_status from live_images WHERE number NOT IN ( SELECT number FROM live_assetelement ); --- End script --- * * Modified: CMSContainer/trunk/CMSContainer/migration/migration_1.6_to_1.7.txt =================================================================== --- CMSContainer/trunk/CMSContainer/migration/migration_1.6_to_1.7.txt 2010-03-11 13:53:17 UTC (rev 41344) +++ CMSContainer/trunk/CMSContainer/migration/migration_1.6_to_1.7.txt 2010-03-11 14:33:18 UTC (rev 41345) @@ -92,13 +92,13 @@ --- Start script --- * First start CMSC 1.6 for the first time (it needs to create the navigationitem tables!) * Execute the following script on database: -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_page; -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_rssfeed; -INSERT INTO mm_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_pagealias; +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_page WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_rssfeed WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); +INSERT INTO mm_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from mm_pagealias WHERE number NOT IN ( SELECT number FROM mm_navigationitem ); -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_page; -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_rssfeed; -INSERT INTO live_navigationitem select number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_pagealias; +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_page WHERE number NOT IN ( SELECT number FROM live_navigationitem ); +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_rssfeed WHERE number NOT IN ( SELECT number FROM live_navigationitem ); +INSERT INTO live_navigationitem SELECT number, otype, owner, creationdate, lastmodifieddate,publishdate,expiredate,lastmodifier,use_expirydate,urlfragment,title,description,inmenu,secure from live_pagealias WHERE number NOT IN ( SELECT number FROM live_navigationitem ); --- End script --- _______________________________________________ Cvs mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/cvs
