function serial_schema in Serial Field 6
Same name and namespace in other branches
- 8 serial.install \serial_schema()
- 7 serial.install \serial_schema()
Implementation of hook_schema().
File
- ./
serial.install, line 46 - Install, update and uninstall functions for the Serial module.
Code
function serial_schema() {
// Get the standard schema:
module_load_include('inc', 'serial');
$table_schema = _serial_get_table_schema();
// Build the schema by iteration over all the serial field instances:
$query = "SELECT type_name, field_name FROM {content_node_field_instance} WHERE widget_module = 'serial'";
$result = db_query($query);
$schema = array();
while ($field = db_fetch_array($result)) {
$table = _serial_get_field_table_name($field);
$schema[$table] = $table_schema;
}
// Return the schema of all the assistant tables (one per serial field instance):
return $schema;
}