/
coKreat - Data Cloud Agnostic migration scripts

coKreat - Data Cloud Agnostic migration scripts

Program-service :

In previous versions, when we were saving the project/program guidelines URL in the program table, it was getting stored with the blob URL.

https://dockstorage.blob.core.windows.net/sunbird-content-dock/content/assets/do_ID/sample.pdf

We want to make these guideline URLs cloud agnostic. The following query will do the task of replacement the same.

Program table data migration Query:

UPDATE program SET    guidelines_url = REPLACE (   guidelines_url, $source, $destination, );

Example:

UPDATE program SET guidelines_url = REPLACE ( guidelines_url, 'https://dockstorage.blob.core.windows.net/sunbird-content-dock/', '/assets/public/');

Verification steps:

Please use below query get then count how many rows having blob path in guidelines URL

select count(*) from program where guidelines_url like '%dockstorage.blob.core.windows.net%';

Before migration, all the guidelines URLs will have data like below

https://dockstorage.blob.core.windows.net/sunbird-content-dock/content/assets/do_ID/\sample.pdf

Please use below query get, then count how many rows having in /assets/public/ guidelines URL. This count should be same as before mibration count.

select count(*) from program where guidelines_url like '%dockstorage.blob.core.windows.net%';

After migration, all the guidelines URLs will have data like below

/assets/public/content/assets/do_ID/sample.pdf

 

Please use the below steps for Knowlg & inQuiry CSP changes deploying in coKreat.

https://knowlg.sunbird.org/use/release-notes/release-5.2.0-ongoing

https://inquiry.sunbird.org/use/release-notes/inquiry-release-v5.2.0-live

 

Related content