Skip to content

Commit

Permalink
Merge pull request #358 from jwalits/fix357-db-schema
Browse files Browse the repository at this point in the history
Fix fields in install.xml to match the upgrade script #357
  • Loading branch information
rickbeasley authored Feb 24, 2022
2 parents be4f2af + 9606056 commit e294f94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions db/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<FIELD NAME="option_encryption_type" TYPE="char" LENGTH="20" NOTNULL="false" DEFAULT="enhanced_encryption" SEQUENCE="false" COMMENT="Meeting encryption type. Can be &quot;enhanced_encryption&quot;, &quot;e2ee&quot;"/>
<FIELD NAME="exists_on_zoom" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Whether the meeting can be found on Zoom servers. Usually should be true, should only be false if API call returned that meeting can't be found."/>
<FIELD NAME="alternative_hosts" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="recordings_visible_default" TYPE="int" LENGTH="1" NOTNULL="false" DEFAULT="1" SEQUENCE="false" COMMENT="Should the recordings for this meeting be visible by default" />
<FIELD NAME="recordings_visible_default" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Should the recordings for this meeting be visible by default" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
Expand Down Expand Up @@ -121,7 +121,7 @@
<FIELD NAME="passcode" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" COMMENT="Passcode to access the recording."/>
<FIELD NAME="recordingtype" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" COMMENT="Type of recording."/>
<FIELD NAME="recordingstart" TYPE="int" LENGTH="12" NOTNULL="true" SEQUENCE="false" />
<FIELD NAME="showrecording" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" />
<FIELD NAME="showrecording" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" DEFAULT="0" />
<FIELD NAME="timecreated" TYPE="int" LENGTH="12" NOTNULL="false" SEQUENCE="false" COMMENT="Timestamp when the record was created."/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="12" NOTNULL="false" SEQUENCE="false" COMMENT="Timestamp when the record was last modified."/>
</FIELDS>
Expand Down
17 changes: 17 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -714,5 +714,22 @@ function xmldb_zoom_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2021112900, 'zoom');
}

if ($oldversion < 2022022400) {

// Change the recordings_visible_default field in the zoom table.
$table = new xmldb_table('zoom');
$field = new xmldb_field('recordings_visible_default', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1',
'alternative_hosts');
$dbman->change_field_default($table, $field);

// Change the showrecording field in the zoom table.
$table = new xmldb_table('zoom_meeting_recordings');
$field = new xmldb_field('showrecording', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0');
$dbman->change_field_default($table, $field);

// Zoom savepoint reached.
upgrade_mod_savepoint(true, 2022022400, 'zoom');
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_zoom';
$plugin->version = 2022012000;
$plugin->version = 2022022400;
$plugin->release = 'v4.3.2';
$plugin->requires = 2017051500.00;
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit e294f94

Please sign in to comment.