Skip to content
Snippets Groups Projects
Unverified Commit f898b067 authored by Tim Schroeder's avatar Tim Schroeder
Browse files

fixed order of upgrade steps

This would lead to a downgrade error when attempting to upgrade from
a very old version.
parent aefe805f
No related branches found
No related tags found
No related merge requests found
...@@ -470,21 +470,6 @@ function xmldb_pdfannotator_upgrade($oldversion) { ...@@ -470,21 +470,6 @@ function xmldb_pdfannotator_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018111901, 'pdfannotator'); upgrade_mod_savepoint(true, 2018111901, 'pdfannotator');
} }
if ($oldversion < 2018112203) {
// Define field solved to be added to pdfannotator_comments.
$table = new xmldb_table('pdfannotator_comments');
$field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
// Conditionally launch add field solved.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Pdfannotator savepoint reached.
upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
}
if ($oldversion < 2018112100) { if ($oldversion < 2018112100) {
// Define field modifiedby to be added to pdfannotator_annotations. // Define field modifiedby to be added to pdfannotator_annotations.
...@@ -518,6 +503,21 @@ function xmldb_pdfannotator_upgrade($oldversion) { ...@@ -518,6 +503,21 @@ function xmldb_pdfannotator_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018112100, 'pdfannotator'); upgrade_mod_savepoint(true, 2018112100, 'pdfannotator');
} }
if ($oldversion < 2018112203) {
// Define field solved to be added to pdfannotator_comments.
$table = new xmldb_table('pdfannotator_comments');
$field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
// Conditionally launch add field solved.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Pdfannotator savepoint reached.
upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
}
if ($oldversion < 2019013000) { if ($oldversion < 2019013000) {
// Rename field seen on table pdfannotator_comments to NEWNAMEGOESHERE. // Rename field seen on table pdfannotator_comments to NEWNAMEGOESHERE.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment