[Building Sakai] EntityBroker. Spaces in custom action entity ids

Adrian Fish a.fish at lancaster.ac.uk
Tue Aug 3 06:53:00 PDT 2010


Did what you suggested and it worked pretty much straight off. Took a 
long time though with 1.2G of SQL to regex over ...

Thanks for tip, much appreciated.

Adrian.

Sam Ottenhoff wrote:
>
>  Yes, it worked.  We did it because we found site_ids containing 
> periods.   The period is used as a prefix separator and is 
> inappropriate as a separator.  Full process:
>
> 1) mysqldump database_name > database.sql
> 2) load up all site ids into excel column A  (SELECT SITE_ID FROM 
> SAKAI_SITE WHERE SITE_ID LIKE '% %')
> 3) copy all site ids into column B, search and replace the bad 
> character with replacement "-"
> 4) column C: write a concatenate function to produce a regular 
> expression for each site id
>
>     perl -pi -e 's/24705.201002/24705-201002/g' database.sql
>
> 5) copy and paste all commands from column C into site-id-corrector.sh
> 6) run site-id-corrector.sh
> 7) mysql database_name < database.sql
>
> --Sam
>
> On 8/2/2010 4:19 PM, Adrian Fish wrote:
>> Nice idea. I like it. Did it work?
>>
>> Sam Ottenhoff wrote:
>>>> Does anybody have experience of changing site ids programmatically, 
>>>> without breaking everything? 
>>>
>>> Yes, I've done this by doing a database dump, running perl regular 
>>> expressions over the database dump, and re-importing the database.
>>>
>>> --Sam
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to 
>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of 
>>> "unsubscribe"
>>>
>>
>

-- 
==================================
Adrian Fish
Software Engineer
Centre for e-Science
Bowland Tower South C Floor
Lancaster University
Lancaster
LA1 4YW
email: a.fish at lancaster.ac.uk

http://confluence.sakaiproject.org/display/YAFT/Yaft
http://confluence.sakaiproject.org/display/CLOG/Home
http://confluence.sakaiproject.org/display/BBB/Home

-------------- next part --------------
A non-text attachment was scrubbed...
Name: a_fish.vcf
Type: text/x-vcard
Size: 289 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100803/904ea8e7/attachment.vcf 


More information about the sakai-dev mailing list