MDL-18577 drop enums support - step2: enums out from editor, dbmanager and all upgrade scripts.

This commit is contained in:
stronk7 2009-05-01 01:19:16 +00:00
parent 3ece3e4273
commit 2a88f626f7
32 changed files with 348 additions and 677 deletions

View file

@ -32,7 +32,7 @@ function xmldb_data_upgrade($oldversion) {
/// Launch add field asearchtemplate again if does not exists yet - reported on several sites
$table = new xmldb_table('data');
$field = new xmldb_field('asearchtemplate', XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'jstemplate');
$field = new xmldb_field('asearchtemplate', XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'jstemplate');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
@ -47,7 +47,7 @@ function xmldb_data_upgrade($oldversion) {
$result = $DB->execute($sql);
$table = new xmldb_table('data');
$field = new xmldb_field('notification', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'editany');
$field = new xmldb_field('notification', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'editany');
// First step, Set NOT NULL
$dbman->change_field_notnull($table, $field);
// Second step, Set default to 0
@ -171,7 +171,7 @@ function xmldb_data_upgrade($oldversion) {
/// Define field introformat to be added to data
$table = new xmldb_table('data');
$field = new xmldb_field('introformat', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'intro');
$field = new xmldb_field('introformat', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'intro');
/// Launch add field introformat
$dbman->add_field($table, $field);