mirror of
https://github.com/moodle/moodle.git
synced 2025-05-03 14:58:42 +02:00
Initial RenameTable caller to generators. Not ended by I needed it in CVS now.
This commit is contained in:
parent
d05babe913
commit
05a43ba36c
@ -782,6 +782,24 @@ class XMLDBTable extends XMLDBObject {
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return the SQL code needed to create the table for the specified DB and
|
||||
* prefix. Just one simple wrapper over generators.
|
||||
*/
|
||||
function getRenameTableSQL ($dbtype, $prefix, $newname, $statement_end=true) {
|
||||
|
||||
$results = array();
|
||||
|
||||
$classname = 'XMLDB' . $dbtype;
|
||||
$generator = new $classname();
|
||||
$generator->setPrefix($prefix);
|
||||
$results = $generator->getRenameTableSQL($this, $newname);
|
||||
if ($statement_end) {
|
||||
$results = $generator->getEndedStatements($results);
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user