-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add migration from v2, move migrations to make space
- Loading branch information
Showing
7 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
class UpdateCoursewarePayload extends Migration | ||
{ | ||
public function up() | ||
{ | ||
$db = DBManager::get(); | ||
|
||
$link = str_replace('/', '\\/', | ||
PluginEngine::getLink('opencast', [], 'redirect/perform/video/') | ||
); | ||
|
||
$stmt = $db->exec($query = "UPDATE cw_blocks | ||
SET payload = REGEXP_REPLACE(payload, '\"url\":\".*\\\\/(.*?)\",\"', '\"url\":\"" . | ||
$link | ||
. "\\\\1\",\"') | ||
WHERE block_type = 'plugin-opencast-video' | ||
"); | ||
} | ||
|
||
public function down() | ||
{ | ||
|
||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.