Add bool type from latest schema_proc from dcl

This commit is contained in:
Miles Lott 2004-02-24 21:32:20 +00:00
parent aeb222d5d7
commit 978c0e6869
3 changed files with 17 additions and 10 deletions

View File

@ -87,6 +87,9 @@
case 'timestamp':
$sTranslated = 'datetime';
break;
case 'bool':
$sTranslated = 'bit';
break;
case 'varchar':
if ($iPrecision > 0 && $iPrecision < 256)
{
@ -180,13 +183,16 @@
case 'text':
$sTranslated = "'type' => '$sType'";
break;
case 'bit':
$sTranslated = "'type' => 'bool'";
break;
}
return $sTranslated;
}
function GetPKSQL($sFields)
{
return "PRIMARY KEY($sFields)";
return "PRIMARY KEY NONCLUSTERED ($sFields)";
}
function GetUCSQL($sFields)

View File

@ -41,6 +41,9 @@
case 'blob':
$sTranslated = 'blob';
break;
case 'bool':
$sTranslated = 'tinyint(1)';
break;
case 'char':
if($iPrecision > 0 && $iPrecision < 256)
{

View File

@ -54,9 +54,6 @@
$sTranslated = 'text';
}
break;
case 'date':
$sTranslated = 'date';
break;
case 'decimal':
$sTranslated = sprintf("decimal(%d,%d)", $iPrecision, $iScale);
break;
@ -75,12 +72,6 @@
case 'longtext':
$sTranslated = 'text';
break;
case 'text':
$sTranslated = 'text';
break;
case 'timestamp':
$sTranslated = 'timestamp';
break;
case 'varchar':
if($iPrecision > 0 && $iPrecision < 256)
{
@ -91,6 +82,12 @@
$sTranslated = 'text';
}
break;
case 'date':
case 'text':
case 'timestamp':
case 'bool':
$sTranslated = $sType;
break;
}
return $sTranslated;
}
@ -164,6 +161,7 @@
case 'text':
case 'blob':
case 'date':
case 'bool';
$sTranslated = "'type' => '$sType'";
break;
}