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

Sam Ottenhoff ottenhoff at longsight.com
Mon Aug 2 13:29:21 PDT 2010


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


More information about the sakai-dev mailing list