$results = array();
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
$checkconsname = $this->getNameForObject($xmldb_table->getName(), $xmldb_field->getName(), 'ck');
$results = array(); /// To store all the needed SQL commands
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Take a look to field metadata
$results = array();
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Decide if we are going to create/modify or to drop the default
$results = array();
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Now, check if, with the current field attributes, we have to build one default
$results = array();
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Look for the default contraint and, if found, drop it
global $db;
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Look for any default constraint in this field and drop it
$trigger = "CREATE TRIGGER " . $trigger_name;
$trigger.= "\n BEFORE INSERT";
- $trigger.= "\nON " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $trigger.= "\nON " . $this->getTableName($xmldb_table);
$trigger.= "\n FOR EACH ROW";
$trigger.= "\nBEGIN";
$trigger.= "\n IF :new." . $this->getEncQuoted($xmldb_field->getName()) . ' IS NULL THEN';
*/
function getCommentSQL ($xmldb_table) {
- $comment = "COMMENT ON TABLE " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table);
$comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'";
return array($comment);
$results = array(); /// To store all the needed SQL commands
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Take a look to field metadata
*/
function getCommentSQL ($xmldb_table) {
- $comment = "COMMENT ON TABLE " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table);
$comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'";
return array($comment);
$results = array(); /// To store all the needed SQL commands
/// Get the quoted name of the table and field
- $tablename = $this->getEncQuoted($this->prefix . $xmldb_table->getName());
+ $tablename = $this->getTableName($xmldb_table);
$fieldname = $this->getEncQuoted($xmldb_field->getName());
/// Take a look to field metadata