Index: modules/aggregator/aggregator.schema =================================================================== --- modules/aggregator/aggregator.schema (revision 1) +++ modules/aggregator/aggregator.schema (working copy) @@ -1,70 +0,0 @@ - array( - 'cid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('cid'), - 'unique keys' => array('title' => array('title')), - ); - - $schema['aggregator_category_feed'] = array( - 'fields' => array( - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('fid', 'cid'), - ); - - $schema['aggregator_category_item'] = array( - 'fields' => array( - 'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('iid', 'cid'), - ); - - $schema['aggregator_feed'] = array( - 'fields' => array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'refresh' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'checked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'image' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'etag' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'unique keys' => array( - 'url' => array('url'), - 'title' => array('title') - ), - 'primary key' => array('fid'), - ); - - $schema['aggregator_item'] = array( - 'fields' => array( - 'iid' => array('type' => 'serial', 'not null' => TRUE), - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'author' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'timestamp' => array('type' => 'int', 'not null' => FALSE), - 'guid' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) - ), - 'indexes' => array('fid' => array('fid')), - 'primary key' => array('iid'), - ); - - return $schema; -} - Index: modules/aggregator/aggregator.install =================================================================== --- modules/aggregator/aggregator.install (revision 1) +++ modules/aggregator/aggregator.install (working copy) @@ -2,6 +2,77 @@ // $Id: aggregator.install,v 1.9 2007/05/25 12:46:43 dries Exp $ /** + * Implementation of hook_schema(). + */ +function aggregator_schema() { + $schema['aggregator_category'] = array( + 'fields' => array( + 'cid' => array('type' => 'serial', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('cid'), + 'unique keys' => array('title' => array('title')), + ); + + $schema['aggregator_category_feed'] = array( + 'fields' => array( + 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('fid', 'cid'), + ); + + $schema['aggregator_category_item'] = array( + 'fields' => array( + 'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('iid', 'cid'), + ); + + $schema['aggregator_feed'] = array( + 'fields' => array( + 'fid' => array('type' => 'serial', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'refresh' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'checked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'image' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'etag' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'unique keys' => array( + 'url' => array('url'), + 'title' => array('title') + ), + 'primary key' => array('fid'), + ); + + $schema['aggregator_item'] = array( + 'fields' => array( + 'iid' => array('type' => 'serial', 'not null' => TRUE), + 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'author' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'timestamp' => array('type' => 'int', 'not null' => FALSE), + 'guid' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) + ), + 'indexes' => array('fid' => array('fid')), + 'primary key' => array('iid'), + ); + + return $schema; +} + + +/** * Implementation of hook_install(). */ function aggregator_install() { Index: modules/system/system.schema =================================================================== --- modules/system/system.schema (revision 1) +++ modules/system/system.schema (working copy) @@ -1,195 +0,0 @@ - array( - 'bid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'token' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE), - 'timestamp' => array('type' => 'int', 'not null' => TRUE), - 'batch' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') - ), - 'primary key' => array('bid'), - 'indexes' => array('token' => array('token')), - ); - - $schema['cache'] = array( - 'fields' => array( - 'cid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'data' => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'), - 'expire' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'headers' => array('type' => 'text', 'not null' => FALSE), - 'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array('expire' => array('expire')), - 'primary key' => array('cid'), - ); - - $schema['cache_form'] = $schema['cache']; - $schema['cache_page'] = $schema['cache']; - $schema['cache_menu'] = $schema['cache']; - - $schema['files'] = array( - 'fields' => array( - 'fid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'filepath' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'filemime' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'filesize' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - ), - 'indexes' => array( - 'uid' => array('uid'), - 'status' => array('status'), - 'timestamp' => array('timestamp'), - ), - 'primary key' => array('fid'), - ); - - $schema['flood'] = array( - 'fields' => array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'event' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('fid'), - ); - - $schema['history'] = array( - 'fields' => array( - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('uid', 'nid'), - ); - $schema['menu_router'] = array( - 'fields' => array( - 'path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'load_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'to_arg_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'access_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'access_arguments' => array('type' => 'text', 'not null' => FALSE), - 'page_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'page_arguments' => array('type' => 'text', 'not null' => FALSE), - 'fit' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'number_parts' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'tab_parent' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'tab_root' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'title_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'title_arguments' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'type' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'block_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE), - 'position' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'file' => array('type' => 'text', 'size' => 'medium') - ), - 'indexes' => array( - 'fit' => array('fit'), - 'tab_parent' => array('tab_parent') - ), - 'primary key' => array('path'), - ); - - $schema['menu_links'] = array( - 'fields' => array( - 'menu_name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'mlid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'plid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'link_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'router_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'hidden' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'external' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'has_children' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'expanded' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'depth' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), - 'p1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'p2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'p3' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'p4' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'p5' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'p6' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'), - 'link_title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'options' => array('type' => 'text', 'not null' => FALSE) - ), - 'indexes' => array( - 'expanded_children' => array('expanded', 'has_children'), - 'menu_name_path' => array('menu_name', 'link_path'), - 'plid'=> array('plid'), - 'parents' => array('p1', 'p2', 'p3', 'p4', 'p5'), - 'router_path' => array('router_path'), - ), - 'primary key' => array('mlid'), - ); - - $schema['sequences'] = array( - 'fields' => array( - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('name'), - ); - - $schema['sessions'] = array( - 'fields' => array( - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), - 'sid' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cache' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'session' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') - ), - 'primary key' => array('sid'), - 'indexes' => array( - 'timestamp' => array('timestamp'), - 'uid' => array('uid') - ), - ); - - $schema['system'] = array( - 'fields' => array( - 'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'owner' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'throttle' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'bootstrap' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'schema_version' => array('type' => 'int', 'not null' => TRUE, 'default' => -1, 'size' => 'small'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'info' => array('type' => 'text', 'not null' => FALSE) - ), - 'primary key' => array('filename'), - 'indexes' => array('weight' => array('weight')), - ); - - $schema['url_alias'] = array( - 'fields' => array( - 'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'src' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'dst' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => '') - ), - 'unique keys' => array('dst_language' => array('dst', 'language')), - 'primary key' => array('pid'), - 'indexes' => array('src' => array('src')), - ); - - $schema['variable'] = array( - 'fields' => array( - 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'value' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - ), - 'primary key' => array('name'), - ); - - return $schema; -} Index: modules/system/system.install =================================================================== --- modules/system/system.install (revision 1) +++ modules/system/system.install (working copy) @@ -2,6 +2,202 @@ // $Id: system.install,v 1.124 2007/06/26 20:24:19 goba Exp $ /** + * Implementation of hook_schema(). + */ +function system_schema() { + $schema['batch'] = array( + 'fields' => array( + 'bid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'token' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE), + 'timestamp' => array('type' => 'int', 'not null' => TRUE), + 'batch' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') + ), + 'primary key' => array('bid'), + 'indexes' => array('token' => array('token')), + ); + + $schema['cache'] = array( + 'fields' => array( + 'cid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'data' => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'), + 'expire' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'headers' => array('type' => 'text', 'not null' => FALSE), + 'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array('expire' => array('expire')), + 'primary key' => array('cid'), + ); + + $schema['cache_form'] = $schema['cache']; + $schema['cache_page'] = $schema['cache']; + $schema['cache_menu'] = $schema['cache']; + + $schema['files'] = array( + 'fields' => array( + 'fid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'filepath' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'filemime' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'filesize' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + ), + 'indexes' => array( + 'uid' => array('uid'), + 'status' => array('status'), + 'timestamp' => array('timestamp'), + ), + 'primary key' => array('fid'), + ); + + $schema['flood'] = array( + 'fields' => array( + 'fid' => array('type' => 'serial', 'not null' => TRUE), + 'event' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('fid'), + ); + + $schema['history'] = array( + 'fields' => array( + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('uid', 'nid'), + ); + $schema['menu_router'] = array( + 'fields' => array( + 'path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'load_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'to_arg_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'access_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'access_arguments' => array('type' => 'text', 'not null' => FALSE), + 'page_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'page_arguments' => array('type' => 'text', 'not null' => FALSE), + 'fit' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'number_parts' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'tab_parent' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'tab_root' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'title_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'title_arguments' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'type' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'block_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => TRUE), + 'position' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'file' => array('type' => 'text', 'size' => 'medium') + ), + 'indexes' => array( + 'fit' => array('fit'), + 'tab_parent' => array('tab_parent') + ), + 'primary key' => array('path'), + ); + + $schema['menu_links'] = array( + 'fields' => array( + 'menu_name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'mlid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'plid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'link_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'router_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'hidden' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'external' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'has_children' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'expanded' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'depth' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'), + 'p1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'p2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'p3' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'p4' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'p5' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'p6' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'), + 'link_title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'options' => array('type' => 'text', 'not null' => FALSE) + ), + 'indexes' => array( + 'expanded_children' => array('expanded', 'has_children'), + 'menu_name_path' => array('menu_name', 'link_path'), + 'plid'=> array('plid'), + 'parents' => array('p1', 'p2', 'p3', 'p4', 'p5'), + 'router_path' => array('router_path'), + ), + 'primary key' => array('mlid'), + ); + + $schema['sequences'] = array( + 'fields' => array( + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('name'), + ); + + $schema['sessions'] = array( + 'fields' => array( + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), + 'sid' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'cache' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'session' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') + ), + 'primary key' => array('sid'), + 'indexes' => array( + 'timestamp' => array('timestamp'), + 'uid' => array('uid') + ), + ); + + $schema['system'] = array( + 'fields' => array( + 'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'owner' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'throttle' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'bootstrap' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'schema_version' => array('type' => 'int', 'not null' => TRUE, 'default' => -1, 'size' => 'small'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'info' => array('type' => 'text', 'not null' => FALSE) + ), + 'primary key' => array('filename'), + 'indexes' => array('weight' => array('weight')), + ); + + $schema['url_alias'] = array( + 'fields' => array( + 'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'src' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'dst' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => '') + ), + 'unique keys' => array('dst_language' => array('dst', 'language')), + 'primary key' => array('pid'), + 'indexes' => array('src' => array('src')), + ); + + $schema['variable'] = array( + 'fields' => array( + 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'value' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + ), + 'primary key' => array('name'), + ); + + return $schema; +} + +/** * Test and report Drupal installation requirements. */ function system_requirements($phase) { Index: modules/upload/upload.schema =================================================================== --- modules/upload/upload.schema (revision 1) +++ modules/upload/upload.schema (working copy) @@ -1,19 +0,0 @@ - array( - 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'list' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('fid', 'vid'), - 'indexes' => array('vid' => array('vid'), 'nid' => array('nid')), - ); - - return $schema; -} - Index: modules/upload/upload.install =================================================================== --- modules/upload/upload.install (revision 1) +++ modules/upload/upload.install (working copy) @@ -2,6 +2,25 @@ // $Id: upload.install,v 1.1 2007/05/30 08:08:59 dries Exp $ /** + * Implementation of hook_schema(). + */ +function upload_schema() { + $schema['upload'] = array( + 'fields' => array( + 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'list' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('fid', 'vid'), + 'indexes' => array('vid' => array('vid'), 'nid' => array('nid')), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function upload_install() { Index: modules/drupal/drupal.schema =================================================================== --- modules/drupal/drupal.schema (revision 1) +++ modules/drupal/drupal.schema (working copy) @@ -1,33 +0,0 @@ - array( - 'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'mail' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'slogan' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'mission' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'users' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'nodes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'version' => array('type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('cid'), - ); - - $schema['client_system'] = array( - 'fields' => array( - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') - ), - 'primary key' => array('cid', 'name'), - ); - - return $schema; -} - Index: modules/drupal/drupal.install =================================================================== --- modules/drupal/drupal.install (revision 1) +++ modules/drupal/drupal.install (working copy) @@ -2,6 +2,39 @@ // $Id: drupal.install,v 1.6 2007/05/25 12:46:44 dries Exp $ /** + * Implementation of hook_schema(). + */ +function drupal_schema() { + $schema['client'] = array( + 'fields' => array( + 'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'mail' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'slogan' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'mission' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'users' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'nodes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'version' => array('type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('cid'), + ); + + $schema['client_system'] = array( + 'fields' => array( + 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') + ), + 'primary key' => array('cid', 'name'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function drupal_install() { Index: modules/statistics/statistics.install =================================================================== --- modules/statistics/statistics.install (revision 1) +++ modules/statistics/statistics.install (working copy) @@ -2,6 +2,29 @@ // $Id: statistics.install,v 1.8 2007/05/25 12:46:45 dries Exp $ /** + * Implementation of hook_schema(). + */ +function statistics_schema() { + $schema['accesslog'] = array( + 'fields' => array( + 'aid' => array('type' => 'serial', 'not null' => TRUE), + 'sid' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'path' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), + 'timer' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array('accesslog_timestamp' => array('timestamp')), + 'primary key' => array('aid'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function statistics_install() { Index: modules/statistics/statistics.schema =================================================================== --- modules/statistics/statistics.schema (revision 1) +++ modules/statistics/statistics.schema (working copy) @@ -1,23 +0,0 @@ - array( - 'aid' => array('type' => 'serial', 'not null' => TRUE), - 'sid' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'path' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), - 'timer' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array('accesslog_timestamp' => array('timestamp')), - 'primary key' => array('aid'), - ); - - return $schema; -} - Index: modules/book/book.install =================================================================== --- modules/book/book.install (revision 1) +++ modules/book/book.install (working copy) @@ -2,6 +2,27 @@ // $Id: book.install,v 1.7 2007/05/25 12:46:43 dries Exp $ /** + * Implementation of hook_schema(). + */ +function book_schema() { + $schema['book'] = array( + 'fields' => array( + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'parent' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'indexes' => array( + 'nid' => array('nid'), + 'parent' => array('parent') + ), + 'primary key' => array('vid'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function book_install() { Index: modules/book/book.schema =================================================================== --- modules/book/book.schema (revision 1) +++ modules/book/book.schema (working copy) @@ -1,21 +0,0 @@ - array( - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'parent' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'indexes' => array( - 'nid' => array('nid'), - 'parent' => array('parent') - ), - 'primary key' => array('vid'), - ); - - return $schema; -} - Index: modules/locale/locale.install =================================================================== --- modules/locale/locale.install (revision 1) +++ modules/locale/locale.install (working copy) @@ -2,6 +2,78 @@ // $Id: locale.install,v 1.14 2007/06/17 17:41:40 goba Exp $ /** + * Implementation of hook_schema(). + */ +function locale_schema() { + $schema['languages'] = array( + 'fields' => array( + // Language code, eg 'de' or 'en-US'. + 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), + // Language name in English. + 'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + // Native language name. + 'native' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + // LANGUAGE_RTL or LANGUAGE_LTR + 'direction' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Enabled flag. + 'enabled' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Number of plural indexes in this language. + 'plurals' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Plural formula in PHP code to evaluate to get plural indexes. + 'formula' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + // Domain to use for this language. + 'domain' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + // Path prefix to use for this language. + 'prefix' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + // Weight, used in lists of languages. + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Location of JavaScript translation file. + 'javascript' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), + ), + 'primary key' => array('language'), + ); + + $schema['locales_source'] = array( + 'fields' => array( + // Unique indentifier of this string. + 'lid' => array('type' => 'serial', 'not null' => TRUE), + // Drupal path in case of online discovered translations or file path in case of imported strings. + 'location' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + // A module defined group of translations, see hook_locale(). + 'textgroup' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + // The original string in English. + 'source' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE), + ), + 'primary key' => array('lid'), + 'indexes' => array + ('source' => array(array('source', 30))), + ); + + $schema['locales_target'] = array( + 'fields' => array( + // References locales_source. + 'lid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Translation string value in this language. + 'translation' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE), + // Language code referencing the languages table. + 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), + // Parent lid (lid of the previous string in the plural chain) in case of plural strings. + 'plid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + // Plural index number in case of plural strings. + 'plural' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'language' => array('language'), + 'lid' => array('lid'), + 'plid' => array('plid'), + 'plural' => array('plural') + ), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function locale_install() { Index: modules/locale/locale.schema =================================================================== --- modules/locale/locale.schema (revision 1) +++ modules/locale/locale.schema (working copy) @@ -1,72 +0,0 @@ - array( - // Language code, eg 'de' or 'en-US'. - 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), - // Language name in English. - 'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - // Native language name. - 'native' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - // LANGUAGE_RTL or LANGUAGE_LTR - 'direction' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Enabled flag. - 'enabled' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Number of plural indexes in this language. - 'plurals' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Plural formula in PHP code to evaluate to get plural indexes. - 'formula' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - // Domain to use for this language. - 'domain' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - // Path prefix to use for this language. - 'prefix' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - // Weight, used in lists of languages. - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Location of JavaScript translation file. - 'javascript' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - ), - 'primary key' => array('language'), - ); - - $schema['locales_source'] = array( - 'fields' => array( - // Unique indentifier of this string. - 'lid' => array('type' => 'serial', 'not null' => TRUE), - // Drupal path in case of online discovered translations or file path in case of imported strings. - 'location' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - // A module defined group of translations, see hook_locale(). - 'textgroup' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - // The original string in English. - 'source' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE), - ), - 'primary key' => array('lid'), - 'indexes' => array - ('source' => array(array('source', 30))), - ); - - $schema['locales_target'] = array( - 'fields' => array( - // References locales_source. - 'lid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Translation string value in this language. - 'translation' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE), - // Language code referencing the languages table. - 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), - // Parent lid (lid of the previous string in the plural chain) in case of plural strings. - 'plid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - // Plural index number in case of plural strings. - 'plural' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'language' => array('language'), - 'lid' => array('lid'), - 'plid' => array('plid'), - 'plural' => array('plural') - ), - ); - - return $schema; -} - Index: modules/menu/menu.schema =================================================================== --- modules/menu/menu.schema (revision 1) +++ modules/menu/menu.schema (working copy) @@ -1,16 +0,0 @@ - array( - 'menu_name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => FALSE), - ), - 'primary key' => array('menu_name'), - ); - - return $schema; -} - Index: modules/menu/menu.install =================================================================== --- modules/menu/menu.install (revision 1) +++ modules/menu/menu.install (working copy) @@ -2,6 +2,23 @@ // $Id: menu.install,v 1.5 2007/06/05 09:15:02 dries Exp $ /** + * Implementation of hook_schema(). + */ +function menu_schema() { + $schema['menu_custom'] = array( + 'fields' => array( + 'menu_name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => FALSE), + ), + 'primary key' => array('menu_name'), + ); + + return $schema; +} + + +/** * Implementation of hook_install(). */ function menu_install() { Index: modules/search/search.schema =================================================================== --- modules/search/search.schema (revision 1) +++ modules/search/search.schema (working copy) @@ -1,40 +0,0 @@ - array( - 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium') - ), - 'indexes' => array('sid_type' => array('sid', 'type')), - ); - - $schema['search_index'] = array( - 'fields' => array( - 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), - 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'fromsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'score' => array('type' => 'float', 'not null' => FALSE) - ), - 'indexes' => array( - 'from_sid_type' => array('fromsid', 'fromtype'), - 'sid_type' => array('sid', 'type'), - 'word' => array('word') - ), - ); - - $schema['search_total'] = array( - 'fields' => array( - 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), - 'count' => array('type' => 'float', 'not null' => FALSE) - ), - 'primary key' => array('word'), - ); - - return $schema; -} - Index: modules/search/search.install =================================================================== --- modules/search/search.install (revision 1) +++ modules/search/search.install (working copy) @@ -2,6 +2,46 @@ // $Id: search.install,v 1.7 2007/05/25 12:46:45 dries Exp $ /** + * Implementation of hook_schema(). + */ +function search_schema() { + $schema['search_dataset'] = array( + 'fields' => array( + 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium') + ), + 'indexes' => array('sid_type' => array('sid', 'type')), + ); + + $schema['search_index'] = array( + 'fields' => array( + 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), + 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'fromsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'score' => array('type' => 'float', 'not null' => FALSE) + ), + 'indexes' => array( + 'from_sid_type' => array('fromsid', 'fromtype'), + 'sid_type' => array('sid', 'type'), + 'word' => array('word') + ), + ); + + $schema['search_total'] = array( + 'fields' => array( + 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), + 'count' => array('type' => 'float', 'not null' => FALSE) + ), + 'primary key' => array('word'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function search_install() { Index: modules/openid/openid.install =================================================================== --- modules/openid/openid.install (revision 1) +++ modules/openid/openid.install (working copy) @@ -2,6 +2,26 @@ // $Id: openid.install,v 1.1 2007/06/18 16:09:39 dries Exp $ /** + * Implementation of hook_schema(). + */ +function openid_schema() { + $schema['openid_association'] = array( + 'fields' => array( + 'idp_endpoint_uri' => array('type' => 'varchar', 'length' => 255), + 'assoc_handle' => array('type' => 'varchar', 'length' => 255), + 'assoc_type' => array('type' => 'varchar', 'length' => 32), + 'session_type' => array('type' => 'varchar', 'length' => 32), + 'mac_key' => array('type' => 'varchar', 'length' => 255), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'expires_in' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + ), + 'primary key' => array('assoc_handle'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function openid_install() { Index: modules/openid/openid.schema =================================================================== --- modules/openid/openid.schema (revision 1) +++ modules/openid/openid.schema (working copy) @@ -1,19 +0,0 @@ - array( - 'idp_endpoint_uri' => array('type' => 'varchar', 'length' => 255), - 'assoc_handle' => array('type' => 'varchar', 'length' => 255), - 'assoc_type' => array('type' => 'varchar', 'length' => 32), - 'session_type' => array('type' => 'varchar', 'length' => 32), - 'mac_key' => array('type' => 'varchar', 'length' => 255), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'expires_in' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - ), - 'primary key' => array('assoc_handle'), - ); - - return $schema; -} \ No newline at end of file Index: modules/color/color.install =================================================================== --- modules/color/color.install (revision 1) +++ modules/color/color.install (working copy) @@ -1,6 +1,9 @@ array( + 'tid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('tid'), + 'indexes' => array('vid' => array('vid')), + ); + + $schema['term_hierarchy'] = array( + 'fields' => array( + 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'parent' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'parent' => array('parent'), + 'tid' => array('tid') + ), + 'primary key' => array('tid', 'parent'), + ); + + $schema['term_node'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'nid' => array('nid'), + 'tid' => array('tid'), + 'vid' => array('vid') + ), + 'primary key' => array( + 'vid', + 'tid', + 'nid' + ), + ); + + $schema['term_relation'] = array( + 'fields' => array( + 'trid' => array('type' => 'serial', 'not null' => TRUE), + 'tid1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'tid2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'tid1' => array('tid1'), + 'tid2' => array('tid2') + ), + 'primary key' => array('trid'), + ); + + $schema['term_synonym'] = array( + 'fields' => array( + 'tsid' => array('type' => 'serial', 'not null' => TRUE), + 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') + ), + 'indexes' => array( + 'name' => array(array('name', 3)), + 'tid' => array('tid') + ), + 'primary key' => array('tsid'), + ); + + $schema['vocabulary'] = array( + 'fields' => array( + 'vid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), + 'help' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'relations' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'hierarchy' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'multiple' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'required' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'tags' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('vid'), + ); + + $schema['vocabulary_node_types'] = array( + 'fields' => array( + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '') + ), + 'primary key' => array('vid', 'type'), + ); + + return $schema; +} + Index: modules/taxonomy/taxonomy.schema =================================================================== --- modules/taxonomy/taxonomy.schema (revision 1) +++ modules/taxonomy/taxonomy.schema (working copy) @@ -1,100 +0,0 @@ - array( - 'tid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('tid'), - 'indexes' => array('vid' => array('vid')), - ); - - $schema['term_hierarchy'] = array( - 'fields' => array( - 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'parent' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'parent' => array('parent'), - 'tid' => array('tid') - ), - 'primary key' => array('tid', 'parent'), - ); - - $schema['term_node'] = array( - 'fields' => array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'nid' => array('nid'), - 'tid' => array('tid'), - 'vid' => array('vid') - ), - 'primary key' => array( - 'vid', - 'tid', - 'nid' - ), - ); - - $schema['term_relation'] = array( - 'fields' => array( - 'trid' => array('type' => 'serial', 'not null' => TRUE), - 'tid1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'tid2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'tid1' => array('tid1'), - 'tid2' => array('tid2') - ), - 'primary key' => array('trid'), - ); - - $schema['term_synonym'] = array( - 'fields' => array( - 'tsid' => array('type' => 'serial', 'not null' => TRUE), - 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') - ), - 'indexes' => array( - 'name' => array(array('name', 3)), - 'tid' => array('tid') - ), - 'primary key' => array('tsid'), - ); - - $schema['vocabulary'] = array( - 'fields' => array( - 'vid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), - 'help' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'relations' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'hierarchy' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'multiple' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'required' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'tags' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('vid'), - ); - - $schema['vocabulary_node_types'] = array( - 'fields' => array( - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '') - ), - 'primary key' => array('vid', 'type'), - ); - - return $schema; -} - Index: modules/node/node.schema =================================================================== --- modules/node/node.schema (revision 1) +++ modules/node/node.schema (working copy) @@ -1,111 +0,0 @@ - array( - 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), - 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'comment' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'promote' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'moderate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'sticky' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'tnid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - ), - 'indexes' => array( - 'nid' => array('nid'), - 'node_changed' => array('changed'), - 'node_created' => array('created'), - 'node_moderate' => array('moderate'), - 'node_promote_status' => array('promote', 'status'), - 'node_status_type' => array('status', 'type', 'nid'), - 'node_title_type' => array('title', array('type', 4)), - 'node_type' => array(array('type', 4)), - 'status' => array('status'), - 'uid' => array('uid'), - 'tnid' => array('tnid'), - 'translate' => array('translate'), - ), - 'unique keys' => array( - 'nid_vid' => array('nid', 'vid'), - 'vid' => array('vid') - ), - 'primary key' => array('nid'), - ); - - $schema['node_access'] = array( - 'fields' => array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'gid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'realm' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'grant_view' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'grant_update' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'grant_delete' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array( - 'nid', - 'gid', - 'realm' - ), - ); - - $schema['node_counter'] = array( - 'fields' => array( - 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'totalcount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'big'), - 'daycount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'medium'), - 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('nid'), - ); - - $schema['node_revisions'] = array( - 'fields' => array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'vid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'body' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'teaser' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'log' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'nid' => array('nid'), - 'uid' => array('uid') - ), - 'primary key' => array('vid'), - ); - - $schema['node_type'] = array( - 'fields' => array( - 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'help' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'has_title' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'), - 'title_label' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'has_body' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'), - 'body_label' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'min_word_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'small'), - 'custom' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'locked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'orig_type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') - ), - 'primary key' => array('type'), - ); - - return $schema; -} - Index: modules/node/node.install =================================================================== --- modules/node/node.install (revision 0) +++ modules/node/node.install (revision 0) @@ -0,0 +1,113 @@ + array( + 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), + 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'comment' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'promote' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'moderate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'sticky' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'tnid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + ), + 'indexes' => array( + 'nid' => array('nid'), + 'node_changed' => array('changed'), + 'node_created' => array('created'), + 'node_moderate' => array('moderate'), + 'node_promote_status' => array('promote', 'status'), + 'node_status_type' => array('status', 'type', 'nid'), + 'node_title_type' => array('title', array('type', 4)), + 'node_type' => array(array('type', 4)), + 'status' => array('status'), + 'uid' => array('uid'), + 'tnid' => array('tnid'), + 'translate' => array('translate'), + ), + 'unique keys' => array( + 'nid_vid' => array('nid', 'vid'), + 'vid' => array('vid') + ), + 'primary key' => array('nid'), + ); + + $schema['node_access'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'gid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'realm' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'grant_view' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'grant_update' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'grant_delete' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array( + 'nid', + 'gid', + 'realm' + ), + ); + + $schema['node_counter'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'totalcount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'big'), + 'daycount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'medium'), + 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('nid'), + ); + + $schema['node_revisions'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'vid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'body' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'teaser' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'log' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'nid' => array('nid'), + 'uid' => array('uid') + ), + 'primary key' => array('vid'), + ); + + $schema['node_type'] = array( + 'fields' => array( + 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), + 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'help' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'has_title' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'), + 'title_label' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'has_body' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'), + 'body_label' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'min_word_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'small'), + 'custom' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'locked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'orig_type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '') + ), + 'primary key' => array('type'), + ); + + return $schema; +} Index: modules/filter/filter.schema =================================================================== --- modules/filter/filter.schema (revision 1) +++ modules/filter/filter.schema (working copy) @@ -1,31 +0,0 @@ - array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'delta' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('fid'), - 'indexes' => array('weight' => array('weight')), - ); - $schema['filter_formats'] = array( - 'fields' => array( - 'format' => array('type' => 'serial', 'not null' => TRUE), - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'roles' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'cache' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'unique keys' => array('name' => array('name')), - 'primary key' => array('format'), - ); - - $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache'); - - return $schema; -} - Index: modules/filter/filter.install =================================================================== --- modules/filter/filter.install (revision 0) +++ modules/filter/filter.install (revision 0) @@ -0,0 +1,33 @@ + array( + 'fid' => array('type' => 'serial', 'not null' => TRUE), + 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'delta' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('fid'), + 'indexes' => array('weight' => array('weight')), + ); + $schema['filter_formats'] = array( + 'fields' => array( + 'format' => array('type' => 'serial', 'not null' => TRUE), + 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'roles' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'cache' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'unique keys' => array('name' => array('name')), + 'primary key' => array('format'), + ); + + $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache'); + + return $schema; +} Index: modules/dblog/dblog.schema =================================================================== --- modules/dblog/dblog.schema (revision 1) +++ modules/dblog/dblog.schema (working copy) @@ -1,25 +0,0 @@ - array( - 'wid' => array('type' => 'serial', 'not null' => TRUE), - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''), - 'message' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'severity' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'location' => array('type' => 'text', 'not null' => TRUE), - 'referer' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('wid'), - 'indexes' => array('type' => array('type')), - ); - - return $schema; -} - Index: modules/dblog/dblog.install =================================================================== --- modules/dblog/dblog.install (revision 1) +++ modules/dblog/dblog.install (working copy) @@ -2,6 +2,32 @@ // $Id: dblog.install,v 1.3 2007/05/25 12:46:44 dries Exp $ /** + * Implementation of hook_schema(). + */ +function dblog_schema() { + $schema['watchdog'] = array( + 'fields' => array( + 'wid' => array('type' => 'serial', 'not null' => TRUE), + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''), + 'message' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'severity' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'location' => array('type' => 'text', 'not null' => TRUE), + 'referer' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('wid'), + 'indexes' => array('type' => array('type')), + ); + + return $schema; +} + + +/** * Implementation of hook_install(). */ function dblog_install() { Index: modules/forum/forum.schema =================================================================== --- modules/forum/forum.schema (revision 1) +++ modules/forum/forum.schema (working copy) @@ -1,20 +0,0 @@ - array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array( - 'nid' => array('nid'), - 'tid' => array('tid') - ), - 'primary key' => array('vid'), - ); - - return $schema; -} - Index: modules/forum/forum.install =================================================================== --- modules/forum/forum.install (revision 1) +++ modules/forum/forum.install (working copy) @@ -2,6 +2,26 @@ // $Id: forum.install,v 1.7 2007/05/25 12:46:44 dries Exp $ /** + * Implementation of hook_schema(). + */ +function forum_schema() { + $schema['forum'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array( + 'nid' => array('nid'), + 'tid' => array('tid') + ), + 'primary key' => array('vid'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function forum_install() { Index: modules/block/block.install =================================================================== --- modules/block/block.install (revision 0) +++ modules/block/block.install (revision 0) @@ -0,0 +1,52 @@ + array( + 'bid' => array('type' => 'serial', 'not null' => TRUE), + 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'delta' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '0'), + 'theme' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'region' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'left'), + 'custom' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'throttle' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'pages' => array('type' => 'text', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '') + ), + 'primary key' => array('bid'), + ); + + $schema['blocks_roles'] = array( + 'fields' => array( + 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE), + 'delta' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE), + 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE) + ), + 'primary key' => array( + 'module', + 'delta', + 'rid' + ), + ); + + $schema['boxes'] = array( + 'fields' => array( + 'bid' => array('type' => 'serial', 'not null' => TRUE), + 'body' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), + 'info' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) + ), + 'unique keys' => array('info' => array('info')), + 'primary key' => array('bid'), + ); + + return $schema; +} + Index: modules/block/block.schema =================================================================== --- modules/block/block.schema (revision 1) +++ modules/block/block.schema (working copy) @@ -1,49 +0,0 @@ - array( - 'bid' => array('type' => 'serial', 'not null' => TRUE), - 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'delta' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '0'), - 'theme' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'region' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'left'), - 'custom' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'throttle' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'pages' => array('type' => 'text', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '') - ), - 'primary key' => array('bid'), - ); - - $schema['blocks_roles'] = array( - 'fields' => array( - 'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE), - 'delta' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE), - 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE) - ), - 'primary key' => array( - 'module', - 'delta', - 'rid' - ), - ); - - $schema['boxes'] = array( - 'fields' => array( - 'bid' => array('type' => 'serial', 'not null' => TRUE), - 'body' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'), - 'info' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) - ), - 'unique keys' => array('info' => array('info')), - 'primary key' => array('bid'), - ); - - return $schema; -} - Index: modules/contact/contact.install =================================================================== --- modules/contact/contact.install (revision 1) +++ modules/contact/contact.install (working copy) @@ -2,6 +2,26 @@ // $Id: contact.install,v 1.7 2007/05/25 12:46:44 dries Exp $ /** + * Implementation of hook_schema(). + */ +function contact_schema() { + $schema['contact'] = array( + 'fields' => array( + 'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'category' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'recipients' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'reply' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'selected' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'unique keys' => array('category' => array('category')), + 'primary key' => array('cid'), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function contact_install() { Index: modules/contact/contact.schema =================================================================== --- modules/contact/contact.schema (revision 1) +++ modules/contact/contact.schema (working copy) @@ -1,20 +0,0 @@ - array( - 'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'category' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'recipients' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), - 'reply' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'selected' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'unique keys' => array('category' => array('category')), - 'primary key' => array('cid'), - ); - - return $schema; -} - Index: modules/profile/profile.schema =================================================================== --- modules/profile/profile.schema (revision 1) +++ modules/profile/profile.schema (working copy) @@ -1,40 +0,0 @@ - array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), - 'explanation' => array('type' => 'text', 'not null' => FALSE), - 'category' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'page' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), - 'type' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), - 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'required' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'register' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'autocomplete' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'options' => array('type' => 'text', 'not null' => FALSE) - ), - 'indexes' => array('category' => array('category')), - 'unique keys' => array('name' => array('name')), - 'primary key' => array('fid'), - ); - - $schema['profile_values'] = array( - 'fields' => array( - 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), - 'value' => array('type' => 'text', 'not null' => FALSE) - ), - 'indexes' => array( - 'fid' => array('fid'), - 'uid' => array('uid') - ), - ); - - return $schema; -} - Index: modules/profile/profile.install =================================================================== --- modules/profile/profile.install (revision 1) +++ modules/profile/profile.install (working copy) @@ -2,6 +2,46 @@ // $Id: profile.install,v 1.9 2007/05/25 12:46:45 dries Exp $ /** + * Implementation of hook_schema(). + */ +function profile_schema() { + $schema['profile_fields'] = array( + 'fields' => array( + 'fid' => array('type' => 'serial', 'not null' => TRUE), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), + 'explanation' => array('type' => 'text', 'not null' => FALSE), + 'category' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'page' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE), + 'type' => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE), + 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'required' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'register' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'autocomplete' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'options' => array('type' => 'text', 'not null' => FALSE) + ), + 'indexes' => array('category' => array('category')), + 'unique keys' => array('name' => array('name')), + 'primary key' => array('fid'), + ); + + $schema['profile_values'] = array( + 'fields' => array( + 'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), + 'value' => array('type' => 'text', 'not null' => FALSE) + ), + 'indexes' => array( + 'fid' => array('fid'), + 'uid' => array('uid') + ), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function profile_install() { Index: modules/comment/comment.schema =================================================================== --- modules/comment/comment.schema (revision 1) +++ modules/comment/comment.schema (working copy) @@ -1,45 +0,0 @@ - array( - 'cid' => array('type' => 'serial', 'not null' => TRUE), - 'pid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'subject' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), - 'comment' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'score' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'medium'), - 'status' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0), - 'thread' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), - 'users' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'), - 'name' => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE), - 'mail' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE), - 'homepage' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) - ), - 'indexes' => array( - 'nid' => array('nid'), - 'status' => array('status') - ), - 'primary key' => array('cid'), - ); - - $schema['node_comment_statistics'] = array( - 'fields' => array( - 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'last_comment_timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'last_comment_name' => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE), - 'last_comment_uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'comment_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')), - 'primary key' => array('nid'), - ); - - return $schema; -} - Index: modules/comment/comment.install =================================================================== --- modules/comment/comment.install (revision 1) +++ modules/comment/comment.install (working copy) @@ -2,6 +2,53 @@ // $Id: comment.install,v 1.2 2006/12/13 22:44:54 unconed Exp $ /** + * Implementation of hook_schema(). + */ +function comment_schema() { + $schema['comments'] = array( + 'fields' => array( + 'cid' => array('type' => 'serial', 'not null' => TRUE), + 'pid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'subject' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), + 'comment' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'score' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'medium'), + 'status' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0), + 'thread' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), + 'users' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'), + 'name' => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE), + 'mail' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE), + 'homepage' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) + ), + 'indexes' => array( + 'nid' => array('nid'), + 'status' => array('status') + ), + 'primary key' => array('cid'), + ); + + $schema['node_comment_statistics'] = array( + 'fields' => array( + 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'last_comment_timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'last_comment_name' => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE), + 'last_comment_uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'comment_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')), + 'primary key' => array('nid'), + ); + + return $schema; +} + + + +/** * Implementation of hook_enable(). */ function comment_enable() { Index: modules/poll/poll.schema =================================================================== --- modules/poll/poll.schema (revision 1) +++ modules/poll/poll.schema (working copy) @@ -1,42 +0,0 @@ - array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'runtime' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'active' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('nid'), - ); - - $schema['poll_choices'] = array( - 'fields' => array( - 'chid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'chtext' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'chvotes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array('nid' => array('nid')), - 'primary key' => array('chid'), - ); - - $schema['poll_votes'] = array( - 'fields' => array( - 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => -1), - 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '') - ), - 'indexes' => array( - 'hostname' => array('hostname'), - 'nid' => array('nid'), - 'uid' => array('uid') - ), - ); - - return $schema; -} - Index: modules/poll/poll.install =================================================================== --- modules/poll/poll.install (revision 1) +++ modules/poll/poll.install (working copy) @@ -2,6 +2,48 @@ // $Id: poll.install,v 1.8 2007/05/25 12:46:45 dries Exp $ /** + * Implementation of hook_schema(). + */ +function poll_schema() { + $schema['poll'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'runtime' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'active' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('nid'), + ); + + $schema['poll_choices'] = array( + 'fields' => array( + 'chid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'chtext' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'chvotes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + ), + 'indexes' => array('nid' => array('nid')), + 'primary key' => array('chid'), + ); + + $schema['poll_votes'] = array( + 'fields' => array( + 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => -1), + 'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '') + ), + 'indexes' => array( + 'hostname' => array('hostname'), + 'nid' => array('nid'), + 'uid' => array('uid') + ), + ); + + return $schema; +} + +/** * Implementation of hook_install(). */ function poll_install() { Index: modules/user/user.install =================================================================== --- modules/user/user.install (revision 0) +++ modules/user/user.install (revision 0) @@ -0,0 +1,87 @@ + array( + 'aid' => array('type' => 'serial', 'not null' => TRUE), + 'mask' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + ), + 'primary key' => array('aid'), + ); + + $schema['authmap'] = array( + 'fields' => array( + 'aid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'authname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'module' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '') + ), + 'unique keys' => array('authname' => array('authname')), + 'primary key' => array('aid'), + ); + + $schema['permission'] = array( + 'fields' => array( + 'pid' => array('type' => 'serial', 'not null' => TRUE), + 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'perm' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'), + 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('pid'), + 'indexes' => array('rid' => array('rid')), + ); + + $schema['role'] = array( + 'fields' => array( + 'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '') + ), + 'unique keys' => array('name' => array('name')), + 'primary key' => array('rid'), + ); + + $schema['users'] = array( + 'fields' => array( + 'uid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'name' => array('type' => 'varchar', 'length' => 60, 'not null' => TRUE, 'default' => ''), + 'pass' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), + 'mail' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''), + 'mode' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'sort' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'), + 'threshold' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'), + 'theme' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'signature' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'access' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'login' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + 'timezone' => array('type' => 'varchar', 'length' => 8, 'not null' => FALSE), + 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), + 'picture' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'init' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''), + 'data' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') + ), + 'indexes' => array( + 'access' => array('access'), + 'created' => array('created') + ), + 'unique keys' => array('name' => array('name')), + 'primary key' => array('uid'), + ); + + $schema['users_roles'] = array( + 'fields' => array( + 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) + ), + 'primary key' => array('uid', 'rid'), + ); + + return $schema; +} Index: modules/user/user.schema =================================================================== --- modules/user/user.schema (revision 1) +++ modules/user/user.schema (working copy) @@ -1,85 +0,0 @@ - array( - 'aid' => array('type' => 'serial', 'not null' => TRUE), - 'mask' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') - ), - 'primary key' => array('aid'), - ); - - $schema['authmap'] = array( - 'fields' => array( - 'aid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'authname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), - 'module' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '') - ), - 'unique keys' => array('authname' => array('authname')), - 'primary key' => array('aid'), - ); - - $schema['permission'] = array( - 'fields' => array( - 'pid' => array('type' => 'serial', 'not null' => TRUE), - 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'perm' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'), - 'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('pid'), - 'indexes' => array('rid' => array('rid')), - ); - - $schema['role'] = array( - 'fields' => array( - 'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '') - ), - 'unique keys' => array('name' => array('name')), - 'primary key' => array('rid'), - ); - - $schema['users'] = array( - 'fields' => array( - 'uid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - 'name' => array('type' => 'varchar', 'length' => 60, 'not null' => TRUE, 'default' => ''), - 'pass' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - 'mail' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''), - 'mode' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'sort' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'), - 'threshold' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'), - 'theme' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'signature' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'access' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'login' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), - 'timezone' => array('type' => 'varchar', 'length' => 8, 'not null' => FALSE), - 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), - 'picture' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'init' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''), - 'data' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium') - ), - 'indexes' => array( - 'access' => array('access'), - 'created' => array('created') - ), - 'unique keys' => array('name' => array('name')), - 'primary key' => array('uid'), - ); - - $schema['users_roles'] = array( - 'fields' => array( - 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('uid', 'rid'), - ); - - return $schema; -} -