Initial commit of rename_table(). Not ended!

This commit is contained in:
stronk7 2006-09-30 22:40:15 +00:00
parent 8ad2207965
commit a59f3a34f3
4 changed files with 86 additions and 15 deletions

View file

@ -91,6 +91,7 @@ class XMLDBgenerator {
var $concat_character = '||'; //Characters to be used as concatenation operator. If not defined
//MySQL CONCAT function will be used
var $rename_table_sql = 'ALTER TABLE OLDNAME RENAME TO NEWNAME'; //SQL sentence to rename one table, both
//OLDNAME and NEWNAME are dinamically replaced
@ -471,9 +472,6 @@ class XMLDBgenerator {
$newt = new XMLDBTable($newname); //Temporal table for name calculations
$oldtablename = $this->getTableName($xmldb_table);
$newtablename = $this->getTableName($newt);
$rename = str_replace('OLDNAME', $this->getTableName($xmldb_table), $this->rename_table_sql);
$rename = str_replace('NEWNAME', $this->getTableName($newt), $rename);

View file

@ -53,6 +53,9 @@ class XMLDBmssql extends XMLDBgenerator {
var $concat_character = '+'; //Characters to be used as concatenation operator. If not defined
//MySQL CONCAT function will be use
var $rename_table_sql = "sp_rename 'OLDNAME', 'NEWNAME'"; //SQL sentence to rename one table, both
//OLDNAME and NEWNAME are dinamically replaced
var $drop_index_sql = 'DROP INDEX TABLENAME.INDEXNAME'; //SQL sentence to drop one index
//TABLENAME, INDEXNAME are dinamically replaced