From 81087e45c5b797028e90181459e4c673cd7be278 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 31 Jan 2010 15:25:59 -0500 Subject: [PATCH] move schema.type.php to typeschema.php like other files --- lib/{schema.mysql.php => mysqlschema.php} | 0 lib/{schema.pgsql.php => pgsqlschema.php} | 0 lib/schema.php | 8 +++----- 3 files changed, 3 insertions(+), 5 deletions(-) rename lib/{schema.mysql.php => mysqlschema.php} (100%) rename lib/{schema.pgsql.php => pgsqlschema.php} (100%) diff --git a/lib/schema.mysql.php b/lib/mysqlschema.php similarity index 100% rename from lib/schema.mysql.php rename to lib/mysqlschema.php diff --git a/lib/schema.pgsql.php b/lib/pgsqlschema.php similarity index 100% rename from lib/schema.pgsql.php rename to lib/pgsqlschema.php diff --git a/lib/schema.php b/lib/schema.php index 27a4deda11..137b814e02 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 "; } -- 2.39.5