From cc3779694a0b74e42a809065ec6eca4bbb4704ca Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 24 Sep 2006 15:54:46 +0000 Subject: [PATCH] MSSQL alter field is exactly the standard one but with alter_column_skip_default enabled --- lib/xmldb/classes/generators/mssql/mssql.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/xmldb/classes/generators/mssql/mssql.class.php b/lib/xmldb/classes/generators/mssql/mssql.class.php index 05551c0c38..29dd7cc8c0 100644 --- a/lib/xmldb/classes/generators/mssql/mssql.class.php +++ b/lib/xmldb/classes/generators/mssql/mssql.class.php @@ -60,8 +60,6 @@ class XMLDBmssql extends XMLDBgenerator { var $concat_character = '+'; //Characters to be used as concatenation operator. If not defined //MySQL CONCAT function will be use - var $alter_column_skip_default = true; //The generator will skip the default clause on alter column - /** * Creates one new XMLDBmssql */ @@ -179,6 +177,15 @@ class XMLDBmssql extends XMLDBgenerator { return $results; } + /** + * Given one XMLDBTable and one XMLDBField, return the SQL statements needded to alter the field in the table + */ + function getAlterFieldSQL($xmldb_table, $xmldb_field) { + /// Just prevent default clauses in this type of sentences for mssql and launch the parent one + $this->alter_column_skip_default = true; + return parent::getAlterFieldSQL($xmldb_table, $xmldb_field); + } + /** * Returns an array of reserved words (lowercase) for this DB */ -- 2.39.5