summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-28 19:38:39 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-28 19:38:39 +0000
commitf31175dcddad07dc6b07d6008108c4ffa3ddea14 (patch)
tree1fe37b4d95b4a42ea4f58e706a5e6472ce37ff90 /includes
parent9a98523a8060882334f052aa2084826c21ef8db0 (diff)
downloadbrdo-f31175dcddad07dc6b07d6008108c4ffa3ddea14.tar.gz
brdo-f31175dcddad07dc6b07d6008108c4ffa3ddea14.tar.bz2
#866340 follow-up by mikl: Document how to add support for non-standard SQL types to hook_schema().
Diffstat (limited to 'includes')
-rw-r--r--includes/database/schema.inc14
1 files changed, 10 insertions, 4 deletions
diff --git a/includes/database/schema.inc b/includes/database/schema.inc
index 36c7964c6..184d895ff 100644
--- a/includes/database/schema.inc
+++ b/includes/database/schema.inc
@@ -40,10 +40,16 @@ require_once dirname(__FILE__) . '/query.inc';
* description might contain "Always holds the largest (most
* recent) {node_revision}.vid value for this nid."
* - 'type': The generic datatype: 'char', 'varchar', 'text', 'blob', 'int',
- * 'float', 'numeric', 'serial', 'date', 'datetime' or 'time'. Most types
- * types just map to the according database engine specific datatypes. Use
- * 'serial' for auto incrementing fields. This will expand to 'INT
- * auto_increment' on MySQL.
+ * 'float', 'numeric', or 'serial'. Most types just map to the according
+ * database engine specific datatypes. Use 'serial' for auto incrementing
+ * fields. This will expand to 'INT auto_increment' on MySQL.
+ * - 'mysql_type', 'pgsql_type', 'sqlite_type', etc.: If you need to
+ * use a record type not included in the officially supported list
+ * of types above, you can specify a type for each database
+ * backend. In this case, you can leave out the type parameter,
+ * but be advised that your schema will fail to load on backends that
+ * do not have a type specified. A possible solution can be to
+ * use the "text" type as a fallback.
* - 'serialize': A boolean indicating whether the field will be stored as
* a serialized string.
* - 'size': The data size: 'tiny', 'small', 'medium', 'normal',