Added support to change_field_enum() across all RDBMS
This commit is contained in:
@@ -259,6 +259,26 @@ class XMLDBpostgres7 extends XMLDBgenerator {
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one XMLDBTable and one XMLDBField, return the SQL statements needded to create its enum
|
||||
* (usually invoked from getModifyEnumSQL()
|
||||
*/
|
||||
function getCreateEnumSQL($xmldb_table, $xmldb_field) {
|
||||
/// All we have to do is to create the check constraint
|
||||
return array('ALTER TABLE ' . $this->getTableName($xmldb_table) .
|
||||
' ADD ' . $this->getEnumExtraSQL($xmldb_table, $xmldb_field));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one XMLDBTable and one XMLDBField, return the SQL statements needded to drop its enum
|
||||
* (usually invoked from getModifyEnumSQL()
|
||||
*/
|
||||
function getDropEnumSQL($xmldb_table, $xmldb_field) {
|
||||
/// All we have to do is to drop the check constraint
|
||||
return array('ALTER TABLE ' . $this->getTableName($xmldb_table) .
|
||||
' DROP CONSTRAINT ' . $this->getNameForObject($xmldb_table->getName(), $xmldb_field->getName(), 'ck'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one XMLDBTable and one XMLDBField, return the SQL statements needded to create its default
|
||||
* (usually invoked from getModifyDefaultSQL()
|
||||
|
||||
Reference in New Issue
Block a user