BUGFIX MSSQLDatabase - fixed bigint broken on dev/build, it shouldn't have a column width

This commit is contained in:
Sean Harvey 2009-07-28 03:48:52 +00:00
parent 8e7516e537
commit 4c2cb7f3e9

View File

@ -568,8 +568,8 @@ class MSSQLDatabase extends Database {
case 'numeric': case 'numeric':
case 'float': case 'float':
case 'bit': case 'bit':
if($sizeSuffix = $field['numeric_precision']) { if($field['data_type'] != 'bigint' && $sizeSuffix = $field['numeric_precision']) {
$field['data_type'] .= "($sizeSuffix)"; $field['data_type'] .= "($sizeSuffix)";
} }
if($field['is_nullable'] == 'YES') { if($field['is_nullable'] == 'YES') {
@ -1027,11 +1027,11 @@ class MSSQLDatabase extends Database {
function IdColumn($asDbValue=false, $hasAutoIncPK=true){ function IdColumn($asDbValue=false, $hasAutoIncPK=true){
if($asDbValue) if($asDbValue)
return 'bigint(19) not null'; return 'bigint not null';
else { else {
if($hasAutoIncPK) if($hasAutoIncPK)
return 'bigint(19) identity(1,1)'; return 'bigint identity(1,1)';
else return 'bigint(19) not null'; else return 'bigint not null';
} }
} }