summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mysqlschema.php (renamed from lib/schema.mysql.php)0
-rw-r--r--lib/pgsqlschema.php (renamed from lib/schema.pgsql.php)0
-rw-r--r--lib/schema.php8
3 files changed, 3 insertions, 5 deletions
diff --git a/lib/schema.mysql.php b/lib/mysqlschema.php
index 1f7c3d092..1f7c3d092 100644
--- a/lib/schema.mysql.php
+++ b/lib/mysqlschema.php
diff --git a/lib/schema.pgsql.php b/lib/pgsqlschema.php
index 91bc09667..91bc09667 100644
--- a/lib/schema.pgsql.php
+++ b/lib/pgsqlschema.php
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 ";
}