diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
commit | 39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch) | |
tree | 9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/drupal/drupal.install | |
parent | d568128b9f7a0181b31e9baa087022e892352ea7 (diff) | |
download | brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.gz brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.bz2 |
- Patch #150245 by webchick, bjaspan, ralf, Arancaytar et al: move the .schema files into .install files to prevent mistakes.
Diffstat (limited to 'modules/drupal/drupal.install')
-rw-r--r-- | modules/drupal/drupal.install | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/drupal/drupal.install b/modules/drupal/drupal.install index 137b7d013..2c99f12c1 100644 --- a/modules/drupal/drupal.install +++ b/modules/drupal/drupal.install @@ -26,3 +26,37 @@ function drupal_uninstall() { variable_del('drupal_default_da_server'); variable_del('drupal_default_da_server_only'); } + +/** + * 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; +} + |