Mercurial > defr > drupal > core
comparison modules/blogapi/blogapi.install @ 19:3edae6ecd6c6 6.9
Drupal 6.9
| author | Franck Deroche <franck@defr.org> | 
|---|---|
| date | Thu, 15 Jan 2009 10:15:56 +0100 | 
| parents | acef7ccb09b5 | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 18:f5131a9cd9e5 | 19:3edae6ecd6c6 | 
|---|---|
| 1 <?php | 1 <?php | 
| 2 // $Id: blogapi.install,v 1.1.2.1 2008/08/13 23:59:12 drumm Exp $ | 2 // $Id: blogapi.install,v 1.1.2.2 2009/01/06 15:46:36 goba Exp $ | 
| 3 | 3 | 
| 4 /** | 4 /** | 
| 5 * Implementation of hook_install(). | 5 * Implementation of hook_install(). | 
| 6 */ | 6 */ | 
| 7 function blogapi_install() { | 7 function blogapi_install() { | 
| 22 * Implementation of hook_schema(). | 22 * Implementation of hook_schema(). | 
| 23 */ | 23 */ | 
| 24 function blogapi_schema() { | 24 function blogapi_schema() { | 
| 25 //This table was introduced in Drupal 6.4 | 25 //This table was introduced in Drupal 6.4 | 
| 26 $schema['blogapi_files'] = array( | 26 $schema['blogapi_files'] = array( | 
| 27 'description' => t('Stores information for files uploaded via the blogapi.'), | 27 'description' => 'Stores information for files uploaded via the blogapi.', | 
| 28 'fields' => array( | 28 'fields' => array( | 
| 29 'fid' => array( | 29 'fid' => array( | 
| 30 'description' => t('Primary Key: Unique file ID.'), | 30 'description' => 'Primary Key: Unique file ID.', | 
| 31 'type' => 'serial', | 31 'type' => 'serial', | 
| 32 ), | 32 ), | 
| 33 'uid' => array( | 33 'uid' => array( | 
| 34 'description' => t('The {users}.uid of the user who is associated with the file.'), | 34 'description' => 'The {users}.uid of the user who is associated with the file.', | 
| 35 'type' => 'int', | 35 'type' => 'int', | 
| 36 'unsigned' => TRUE, | 36 'unsigned' => TRUE, | 
| 37 'not null' => TRUE, | 37 'not null' => TRUE, | 
| 38 'default' => 0), | 38 'default' => 0), | 
| 39 'filepath' => array( | 39 'filepath' => array( | 
| 40 'description' => t('Path of the file relative to Drupal root.'), | 40 'description' => 'Path of the file relative to Drupal root.', | 
| 41 'type' => 'varchar', | 41 'type' => 'varchar', | 
| 42 'length' => 255, | 42 'length' => 255, | 
| 43 'not null' => TRUE, | 43 'not null' => TRUE, | 
| 44 'default' => ''), | 44 'default' => ''), | 
| 45 'filesize' => array( | 45 'filesize' => array( | 
| 46 'description' => t('The size of the file in bytes.'), | 46 'description' => 'The size of the file in bytes.', | 
| 47 'type' => 'int', | 47 'type' => 'int', | 
| 48 'unsigned' => TRUE, | 48 'unsigned' => TRUE, | 
| 49 'not null' => TRUE, | 49 'not null' => TRUE, | 
| 50 'default' => 0), | 50 'default' => 0), | 
| 51 ), | 51 ), | 
| 77 * | 77 * | 
| 78 * This table was introduced in Drupal 6.4. | 78 * This table was introduced in Drupal 6.4. | 
| 79 */ | 79 */ | 
| 80 function blogapi_update_6001() { | 80 function blogapi_update_6001() { | 
| 81 $schema['blogapi_files'] = array( | 81 $schema['blogapi_files'] = array( | 
| 82 'description' => t('Stores information for files uploaded via the blogapi.'), | 82 'description' => 'Stores information for files uploaded via the blogapi.', | 
| 83 'fields' => array( | 83 'fields' => array( | 
| 84 'fid' => array( | 84 'fid' => array( | 
| 85 'description' => t('Primary Key: Unique file ID.'), | 85 'description' => 'Primary Key: Unique file ID.', | 
| 86 'type' => 'serial', | 86 'type' => 'serial', | 
| 87 ), | 87 ), | 
| 88 'uid' => array( | 88 'uid' => array( | 
| 89 'description' => t('The {users}.uid of the user who is associated with the file.'), | 89 'description' => 'The {users}.uid of the user who is associated with the file.', | 
| 90 'type' => 'int', | 90 'type' => 'int', | 
| 91 'unsigned' => TRUE, | 91 'unsigned' => TRUE, | 
| 92 'not null' => TRUE, | 92 'not null' => TRUE, | 
| 93 'default' => 0), | 93 'default' => 0), | 
| 94 'filepath' => array( | 94 'filepath' => array( | 
| 95 'description' => t('Path of the file relative to Drupal root.'), | 95 'description' => 'Path of the file relative to Drupal root.', | 
| 96 'type' => 'varchar', | 96 'type' => 'varchar', | 
| 97 'length' => 255, | 97 'length' => 255, | 
| 98 'not null' => TRUE, | 98 'not null' => TRUE, | 
| 99 'default' => ''), | 99 'default' => ''), | 
| 100 'filesize' => array( | 100 'filesize' => array( | 
| 101 'description' => t('The size of the file in bytes.'), | 101 'description' => 'The size of the file in bytes.', | 
| 102 'type' => 'int', | 102 'type' => 'int', | 
| 103 'unsigned' => TRUE, | 103 'unsigned' => TRUE, | 
| 104 'not null' => TRUE, | 104 'not null' => TRUE, | 
| 105 'default' => 0), | 105 'default' => 0), | 
| 106 ), | 106 ), | 
