move schema.type.php to typeschema.php like other files

This commit is contained in:
Evan Prodromou 2010-01-31 15:25:59 -05:00
parent ebf4e497f6
commit 81087e45c5
3 changed files with 3 additions and 5 deletions

View File

@ -77,14 +77,12 @@ class Schema
{ {
$type = common_config('db', 'type'); $type = common_config('db', 'type');
if (empty(self::$_single)) { if (empty(self::$_single)) {
include "lib/schema.{$type}.php"; $schemaClass = ucfirst($type).'Schema';
$class = $type.='Schema'; self::$_single = new $schemaClass();
self::$_single = new $class();
} }
return self::$_single; return self::$_single;
} }
/** /**
* Gets a ColumnDef object for a single column. * Gets a ColumnDef object for a single column.
* *
@ -475,7 +473,7 @@ class Schema
} else { } else {
$sql .= ($cd->nullable) ? "null " : "not null "; $sql .= ($cd->nullable) ? "null " : "not null ";
} }
if (!empty($cd->auto_increment)) { if (!empty($cd->auto_increment)) {
$sql .= " auto_increment "; $sql .= " auto_increment ";
} }