summaryrefslogtreecommitdiff
path: root/lib/schema.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-12 11:19:56 -0800
committerBrion Vibber <brion@pobox.com>2010-03-12 13:16:32 -0800
commit9e9ab23e1f936eb62014d8f7b0051f0314ae482c (patch)
treea08e80d705d08ffb33233991bf80e7c19867552a /lib/schema.php
parent4d7479dcbc3d0f658de230c139242e7176d0ba16 (diff)
Fixes for updating indices, charset/collation and engine type on plugin-created tables.
Under MySQL, new tables will be created as InnoDB with UTF-8 (utf8/utf8_bin) same as core tables. Existing plugin tables will have table engine and default charset/collation updated, and string columns will have charset updated, at checkschema time. Switched from 'DESCRIBE' to INFORMATION_SCHEMA for pulling column information in order to get charset. A second hit to INFORMATION_SCHEMA is also needed to get table properties. Indices were only being created at table creation time, which ain't so hot. Now also adding/dropping indices when they change. Fixed up some schema defs in OStatus plugin that were a bit flaky, causing extra alter tables to be run. TODO: Generalize this infrastructure a bit more up to base schema & pg schema classes.
Diffstat (limited to 'lib/schema.php')
-rw-r--r--lib/schema.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/schema.php b/lib/schema.php
index 137b814e0..1503c96d4 100644
--- a/lib/schema.php
+++ b/lib/schema.php
@@ -485,3 +485,9 @@ class Schema
return $sql;
}
}
+
+class SchemaTableMissingException extends Exception
+{
+ // no-op
+}
+