Drupal Schema module
The Schema API allows the module to declare a database in the Form of a structured array (similar to the Form API), and provides API functions for creating, deleting, and modifying data tables, columns, keys, and indexes.
The Schema module provides some functions other than the Schema API of the Drupal core architecture. Currently, this includes:
Schema document: an embedded document that displays Schema in hyperlink form is used to explain what each data table and field is doing.
Schema structure generation: the Schema module can check the real-time database and create the Schema API data structure of all tables in the matched real-time database.
Schema comparison: the Schema module compares the real-time database structure with the schema structure defined by all enabled modules to report any lost or incorrect tables.
MySQL considerations: the Schema module requires MySQL version 5 or later. MySQL versions earlier than MySQL do not support the Schema module to check the INFORMATION_SCHEMA database in the database.
Type |
Size |
MySQL type & size/range |
Serial |
Tiny |
Tinyint, 1 B |
Serial |
Small |
Smallint, 2 B |
Serial |
Medium |
Mediumint, 3 B |
Serial |
Big |
Bigint, 8 B |
Serial |
Normal |
Int, 4 B |
Int |
Tiny |
Tinyint, 1 B |
Int |
Small |
Smallint, 2 B |
Int |
Medium |
Mediumint, 3 B |
Int |
Big |
Bigint, 8 B |
Int |
Normal |
Int, 4 B |
Float |
Tiny |
Float, 4 B |
Float |
Small |
Float, 4 B |
Float |
Medium |
Float, 4 B |
Float |
Big |
Double, 8 B |
Float |
Normal |
Float, 4 B |
Numeric |
Normal |
Numeric, 65 digits |
Varchar |
Normal |
Varchar, 255 B (D6) or 64 KB (D7 and later)1 |
Char |
Normal |
Char, 255 B |
Text |
Tiny |
Tinytext, 256 B |
Text |
Small |
Tinytext, 256 B |
Text |
Medium |
Mediumtext, 16 MB |
Text |
Big |
Longtext, 4 GB |
Text |
Normal |
Text, 16 KB |
Blob |
Big |
Longblob, 4 GB |
Blob |
Normal |
Blob, 16 KB |
Download the Schema module:
Http://drupal.org/project/schema
Original article from: blog.lixiphp.com