summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-31 15:25:59 -0500
committerEvan Prodromou <evan@status.net>2010-01-31 15:25:59 -0500
commit81087e45c5b797028e90181459e4c673cd7be278 (patch)
tree3ec0b0a034d2feeb551d0428aae0bc0b83730d3e
parentebf4e497f6e520b011a2a364a9a866fb2d7fb262 (diff)
move schema.type.php to typeschema.php like other files
-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 ";
}