Skip to content

Commit

Permalink
Fixing incorrect default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 21, 2011
1 parent 2e5bdd8 commit f353eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Sqlserver.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function describe($model) {
if ($cache != null) { if ($cache != null) {
return $cache; return $cache;
} }
$fields = false; $fields = array();
$table = $this->fullTableName($model, false); $table = $this->fullTableName($model, false);
$cols = $this->_execute("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $table . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $table . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $table . "'"); $cols = $this->_execute("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $table . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $table . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $table . "'");
if (!$cols) { if (!$cols) {
Expand Down

0 comments on commit f353eb7

Please sign in to comment.