/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Conditionally launch create table for ' . $table->getName() . XMLDB_LINEFEED;
- $result .= ' if (!table_exists($table)) {' . XMLDB_LINEFEED;
- $result .= ' $result = $result && create_table($table);' . XMLDB_LINEFEED;
+ $result .= ' if (!$dbman->table_exists($table)) {' . XMLDB_LINEFEED;
+ $result .= ' $result = $result && $dbman->create_table($table);' . XMLDB_LINEFEED;
$result .= ' }' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Conditionally launch drop table for ' . $table->getName() . XMLDB_LINEFEED;
- $result .= ' if (table_exists($table)) {' . XMLDB_LINEFEED;
- $result .= ' $result = $result && drop_table($table);' . XMLDB_LINEFEED;
+ $result .= ' if ($dbman->table_exists($table)) {' . XMLDB_LINEFEED;
+ $result .= ' $result = $result && $dbman->drop_table($table);' . XMLDB_LINEFEED;
$result .= ' }' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch rename table for ' . $table->getName() . XMLDB_LINEFEED;
- $result .= ' $result = $result && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
+ $result .= ' $result = $result && $dbman->rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
/// Add the proper upgrade_xxxx_savepoint call
$result .= $this->upgrade_savepoint_php ($structure);