From 783a2e249bac2ccd02b6ae3351dfe83630b71cc0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 4 Jan 2010 10:30:19 -0800 Subject: Fix for auto_increment parameter in auto-created tables via checkschema. Update FeedSub plugin for non-Plugin_DataObject setup and working checkschema updates. --- lib/columndef.php | 1 + lib/schema.php | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/columndef.php b/lib/columndef.php index 1bae6b33b..ac2fcd23e 100644 --- a/lib/columndef.php +++ b/lib/columndef.php @@ -74,6 +74,7 @@ class ColumnDef * @param string $key type of key * @param value $default default value * @param value $extra unused + * @param boolean $auto_increment */ function __construct($name=null, $type=null, $size=null, diff --git a/lib/schema.php b/lib/schema.php index a8ba91b87..6fe442d56 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -523,6 +523,10 @@ class Schema } else { $sql .= ($cd->nullable) ? "null " : "not null "; } + + if (!empty($cd->auto_increment)) { + $sql .= " auto_increment "; + } return $sql; } -- cgit v1.2.3-54-g00ecf