{
return '"' . str_replace('"', '""', $name) . '"';
}
-
+
/**
* Quotes sequence names for use in SQL queries.
*
$default = isset($options['default']) ? $options['default'] : null;
$notnull = isset($options['null']) && $options['null'] === false;
if (array_key_exists('default', $options))
- $this->changeColumnDefault($tableName, $columnName, $fault);
+ $this->changeColumnDefault($tableName, $columnName, $default);
if ($notnull)
$this->changeColumnNull($tableName, $columnName, false, $default);
}
{
$this->_clearTableCache($tableName);
if (!($null || is_null($default))) {
- $this->execute('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL');
+ $this->execute('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columnName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL');
}
return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName).' ALTER '.$this->quoteColumnName($columnName).' '.($null ? 'DROP' : 'SET').' NOT NULL');
}