diff options
author | Evan Prodromou <evan@status.net> | 2010-01-31 15:25:59 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-31 15:25:59 -0500 |
commit | 81087e45c5b797028e90181459e4c673cd7be278 (patch) | |
tree | 3ec0b0a034d2feeb551d0428aae0bc0b83730d3e /lib | |
parent | ebf4e497f6e520b011a2a364a9a866fb2d7fb262 (diff) |
move schema.type.php to typeschema.php like other files
Diffstat (limited to 'lib')
-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.php | 8 |
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 "; } |