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/profile/profile.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/profile/profile.install')
-rw-r--r-- | modules/profile/profile.install | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/profile/profile.install b/modules/profile/profile.install index 8e645c28f..e8642da75 100644 --- a/modules/profile/profile.install +++ b/modules/profile/profile.install @@ -18,3 +18,44 @@ function profile_uninstall() { variable_del('profile_block_author_fields'); } + +/** + * 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' => TRUE, 'default' => ''), + '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; +} + |