Skip to content

Commit cd047ee

Browse files
committed
Removed unused 'customcert_email_task_prgrs' table (#531)
1 parent 474e6b5 commit cd047ee

File tree

4 files changed

+13
-59
lines changed

4 files changed

+13
-59
lines changed

db/install.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

db/install.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,5 @@
100100
<KEY NAME="page" TYPE="foreign" FIELDS="pageid" REFTABLE="customcert_pages" REFFIELDS="id"/>
101101
</KEYS>
102102
</TABLE>
103-
<TABLE NAME="customcert_email_task_prgrs" COMMENT="to track email task progress">
104-
<FIELDS>
105-
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
106-
<FIELD NAME="taskname" TYPE="char" LENGTH="255" NOTNULL="true" DEFAULT="email_certificate_task" SEQUENCE="false"/>
107-
<FIELD NAME="last_processed" TYPE="int" LENGTH="20" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
108-
<FIELD NAME="total_certificate_to_process" TYPE="int" LENGTH="20" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="to store the total count of certificates that should be processed"/>
109-
</FIELDS>
110-
<KEYS>
111-
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
112-
</KEYS>
113-
</TABLE>
114103
</TABLES>
115104
</XMLDB>

db/upgrade.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,17 @@ function xmldb_customcert_upgrade($oldversion) {
286286
upgrade_mod_savepoint(true, 2023042411, 'customcert');
287287
}
288288

289+
if ($oldversion < 2023042413) {
290+
// Drop unused table customcert_email_task_prgrs.
291+
$table = new xmldb_table('customcert_email_task_prgrs');
292+
293+
if ($dbman->table_exists($table)) {
294+
$dbman->drop_table($table);
295+
}
296+
297+
// Customcert savepoint reached.
298+
upgrade_mod_savepoint(true, 2023042413, 'customcert');
299+
}
300+
289301
return true;
290302
}

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
2626

27-
$plugin->version = 2023042412; // The current module version (Date: YYYYMMDDXX).
27+
$plugin->version = 2023042413; // The current module version (Date: YYYYMMDDXX).
2828
$plugin->requires = 2023042400; // Requires this Moodle version (4.2).
2929
$plugin->cron = 0; // Period for cron to check this module (secs).
3030
$plugin->component = 'mod_customcert';

0 commit comments

Comments
 (0)