diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-10-05 16:07:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-10-05 16:07:22 +0000 |
commit | 5a752dc507618499ff5ad72bc1258692e1905284 (patch) | |
tree | 08522c7b1733dc5ec6c82f30ec572c8610dd88dd | |
parent | 74a431e79a31d3d2dbec8ac65f28edb432765f92 (diff) | |
download | brdo-5a752dc507618499ff5ad72bc1258692e1905284.tar.gz brdo-5a752dc507618499ff5ad72bc1258692e1905284.tar.bz2 |
- Added missing .install files. Forgot to commit those.
-rw-r--r-- | modules/block/block.install | 55 | ||||
-rw-r--r-- | modules/filter/filter.install | 34 | ||||
-rw-r--r-- | modules/node/node.install | 113 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.install | 103 | ||||
-rw-r--r-- | modules/user/user.install | 88 |
5 files changed, 393 insertions, 0 deletions
diff --git a/modules/block/block.install b/modules/block/block.install new file mode 100644 index 000000000..705a38b5c --- /dev/null +++ b/modules/block/block.install @@ -0,0 +1,55 @@ +<?php +// $Id$ + +/** + * Implementation of hook_schema(). + */ +function block_schema() { + $schema['blocks'] = array( + 'fields' => 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' => ''), + 'cache' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), + ), + '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', 'unsigned' => TRUE, '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'), + ); + + $schema['cache_block'] = drupal_get_schema_unprocessed('system', 'cache'); + + return $schema; +} + diff --git a/modules/filter/filter.install b/modules/filter/filter.install new file mode 100644 index 000000000..ec453bb8b --- /dev/null +++ b/modules/filter/filter.install @@ -0,0 +1,34 @@ +<?php +// $Id$ + +/** + * Implementation of hook_schema(). + */ +function filter_schema() { + $schema['filters'] = array( + 'fields' => 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; +} + diff --git a/modules/node/node.install b/modules/node/node.install new file mode 100644 index 000000000..5c1489d89 --- /dev/null +++ b/modules/node/node.install @@ -0,0 +1,113 @@ +<?php +// $Id$ + +/** + * Implementation of hook_schema(). + */ +function node_schema() { + $schema['node'] = array( + 'fields' => array( + 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), + 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, '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' => 255, '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( + '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' => 255, '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; +} + diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install new file mode 100644 index 000000000..d88696c46 --- /dev/null +++ b/modules/taxonomy/taxonomy.install @@ -0,0 +1,103 @@ +<?php +// $Id$ + +/** + * Implementation of hook_schema(). + */ +function taxonomy_schema() { + $schema['term_data'] = array( + 'fields' => 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; +} + diff --git a/modules/user/user.install b/modules/user/user.install new file mode 100644 index 000000000..f9d656a5a --- /dev/null +++ b/modules/user/user.install @@ -0,0 +1,88 @@ +<?php +// $Id$ + +/** + * Implementation of hook_schema(). + */ +function user_schema() { + $schema['access'] = array( + 'fields' => 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' => 'big'), + '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' => 'big') + ), + '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; +} + |