summaryrefslogtreecommitdiff
path: root/lib/schema.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-31 23:42:19 +0100
committerSarven Capadisli <csarven@status.net>2010-01-31 23:42:19 +0100
commit7558e2fd61c527b31b5a49d29a59b6b0b1d6d542 (patch)
tree4f71863c12f8b20b261dad09496f65ca872f5712 /lib/schema.php
parent4d0ee6a41f3cfb2e99dcb92e7b14f3183393f1a5 (diff)
parent81087e45c5b797028e90181459e4c673cd7be278 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/schema.php')
-rw-r--r--lib/schema.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/schema.php b/lib/schema.php
index 27a4deda1..137b814e0 100644
--- a/lib/schema.php
+++ b/lib/schema.php
@@ -77,14 +77,12 @@ class Schema
{
$type = common_config('db', 'type');
if (empty(self::$_single)) {
- include "lib/schema.{$type}.php";
- $class = $type.='Schema';
- self::$_single = new $class();
+ $schemaClass = ucfirst($type).'Schema';
+ self::$_single = new $schemaClass();
}
return self::$_single;
}
-
/**
* Gets a ColumnDef object for a single column.
*
@@ -475,7 +473,7 @@ class Schema
} else {
$sql .= ($cd->nullable) ? "null " : "not null ";
}
-
+
if (!empty($cd->auto_increment)) {
$sql .= " auto_increment ";
}