mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-36941 message_popup: do not remove message_popup table
This is a partial revert of commit 123631ad4718141627d77027dbef0448bae22ac8. Most of the logic was NOT reverted, just the part deleting the table was. Note - this fix was done on integration.git and as a result no upgrade step was added to re-introduce the table, sorry! This means for those on integration.git you will have to re-install your Moodle site so the 'message_popup' table is present. Please see tracker for comments as to why we need to keep it! :)
This commit is contained in:
parent
e8b3c3e178
commit
7489e4d5b9
22
message/output/popup/db/install.xml
Normal file
22
message/output/popup/db/install.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="message/output/popup/db" VERSION="20161221" COMMENT="XMLDB file for Moodle message/output/popup"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
<TABLES>
|
||||
<TABLE NAME="message_popup" COMMENT="Keep state of notifications for the popup message processor">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="messageid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="isread" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
</KEYS>
|
||||
<INDEXES>
|
||||
<INDEX NAME="messageid-isread" UNIQUE="true" FIELDS="messageid, isread"/>
|
||||
<INDEX NAME="isread" UNIQUE="false" FIELDS="isread"/>
|
||||
</INDEXES>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
</XMLDB>
|
@ -83,16 +83,5 @@ function xmldb_message_popup_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.4.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2018022000) {
|
||||
// Drop table that is no longer needed.
|
||||
$table = new xmldb_table('message_popup');
|
||||
if ($dbman->table_exists($table)) {
|
||||
$dbman->drop_table($table);
|
||||
}
|
||||
|
||||
// Popup savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2018022000, 'message', 'popup');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user