Skip to content

Commit

Permalink
Merge pull request #180 from kaltura/KMS-18437_upgrade_video_title_ma…
Browse files Browse the repository at this point in the history
…x_length

KMS-18437 update Kaltura Video Resource video_title column length to …
  • Loading branch information
muli authored Dec 2, 2018
2 parents 7d0bcde + 0d495ad commit 4d17efe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod/kalvidres/db/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" PREVIOUS="name" NEXT="introformat"/>
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="intro" NEXT="entry_id"/>
<FIELD NAME="entry_id" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" COMMENT="Kaltura video entry ids" PREVIOUS="introformat" NEXT="video_title"/>
<FIELD NAME="video_title" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" COMMENT="Video title" PREVIOUS="entry_id" NEXT="uiconf_id"/>
<FIELD NAME="video_title" TYPE="char" LENGTH="256" NOTNULL="true" SEQUENCE="false" COMMENT="Video title" PREVIOUS="entry_id" NEXT="uiconf_id"/>
<FIELD NAME="uiconf_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="The player to be used for playback" PREVIOUS="video_title" NEXT="widescreen"/>
<FIELD NAME="widescreen" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Video playback dimensions widescreen or normal" PREVIOUS="uiconf_id" NEXT="height"/>
<FIELD NAME="height" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Video height" PREVIOUS="widescreen" NEXT="width"/>
Expand Down
12 changes: 12 additions & 0 deletions mod/kalvidres/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ function xmldb_kalvidres_upgrade($oldversion) {

$dbman = $DB->get_manager();

if ($oldversion < 2018112735) {
// Changing precision of field video_title on table kalvidres to (256).
$table = new xmldb_table('kalvidres');
$field = new xmldb_field('video_title', XMLDB_TYPE_CHAR, '256', null, XMLDB_NOTNULL, null, null, 'entry_id');

// Launch change of precision for field video_title.
$dbman->change_field_precision($table, $field);

// Kalvidres savepoint reached.
upgrade_mod_savepoint(true, 2018112735, 'kalvidres');
}

if ($oldversion < 2011110702) {

// Changing type of field intro on table kalvidres to text.
Expand Down

0 comments on commit 4d17efe

Please sign in to comment.