| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id$ 3 // Affiliate module install file 4 5 /** 6 * Implementation of hook_install(). 7 */ 8 function affiliate_install() { 9 // Create tables. 10 drupal_install_schema('affiliate'); 11 watchdog("affiliate","Installed affiliate",$variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL); 12 13 } 14 15 16 /** 17 * Implementation of hook_uninstall(). 18 */ 19 function affiliate_uninstall() { 20 drupal_uninstall_schema('affiliate'); 21 watchdog("affiliate","Un-Installed affiliate",$variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL); 22 23 } 24 25 26 /** 27 * Implementation of hook_schema(). 28 */ 29 function affiliate_schema() { 30 $schema['affiliate'] = array( 31 'description' => t('Affiliate sign-up info'), 32 'fields' => array( 33 'aaid' => array( 34 'description' => t('affiliate application id'), 35 'type' => 'serial', 36 'unsigned' => TRUE, 37 'not null' => TRUE, 38 ), 39 'uid' => array( 40 'description' => t('User id of creator'), 41 'type' => 'int', 42 'unsigned' => TRUE, 43 'not null' => TRUE, 44 ), 45 'affiliate_application_status' => array( 46 'description' => t('Application status'), 47 'type' => 'varchar', 48 'length' => 10, 49 'not null' => TRUE, 50 'default' => 'pending', 51 ), 52 'affiliate_accept' => array( 53 'description' => t('accept conditions checkbox value'), 54 'type' => 'int', 55 'size' => 'tiny', 56 ), 57 'affiliate_type' => array( 58 'description' => t('type of broadcasting service'), 59 'type' => 'varchar', 60 'length' => '40', 61 'not null' => TRUE, 62 ), 63 'affiliate_name' => array( 64 'description' => t('name of broadcasting service'), 65 'type' => 'varchar', 66 'length' => '128', 67 'not null' => TRUE, 68 ), 69 'affiliate_address' => array( 70 'description' => t('mailing address'), 71 'type' => 'text', 72 'size' => 'big', 73 'not null' => TRUE, 74 ), 75 'affiliate_postalcode' => array( 76 'description' => t('postal code'), 77 'type' => 'char', 78 'length' => '10', 79 'not null' => TRUE, 80 ), 81 'affiliate_fax' => array( 82 'description' => t('fax number'), 83 'type' => 'char', 84 'length' => '16', 85 'not null' => TRUE, 86 ), 87 'affiliate_url' => array( 88 'description' => t('web-site URL'), 89 'type' => 'varchar', 90 'length' => '128', 91 'not null' => FALSE, 92 ), 93 'affiliate_contact_title' => array( 94 'description' => t('title of primary contact'), 95 'type' => 'varchar', 96 'length' => '128', 97 'not null' => TRUE, 98 ), 99 'affiliate_contact_name' => array( 100 'description' => t('name of primary contact'), 101 'type' => 'varchar', 102 'length' => '128', 103 'not null' => TRUE, 104 ), 105 'affiliate_contact_telephone' => array( 106 'description' => t('telephone number'), 107 'type' => 'char', 108 'length' => '16', 109 'not null' => TRUE, 110 ), 111 'affiliate_contact_extension' => array( 112 'description' => t('extension'), 113 'type' => 'char', 114 'length' => '8', 115 'not null' => TRUE, 116 ), 117 'affiliate_contact_email' => array( 118 'description' => t('e-mail address'), 119 'type' => 'varchar', 120 'length' => '128', 121 'not null' => TRUE, 122 ), 123 'affiliate_logo' => array( 124 'description' => t('image cache id'), 125 'type' => 'int', 126 'unsigned' => TRUE, 127 ), 128 'affiliate_update_date' => array( 129 'description' => t('creation date'), 130 'mysql_type' => 'timestamp', 131 'type' => 'datetime', 132 'not null' => TRUE, 133 'default' => 'CURRENT_TIMESTAMP', 134 ), 135 'affiliate_creation_date' => array( 136 'description' => t('creation date'), 137 'type' => 'datetime', 138 'not null' => TRUE, 139 ), 140 ), 141 'primary key' => array('aaid'), 142 'unique keys' => array( 143 'uid' => array('uid'), 144 ), 145 ); 146 147 $schema['affiliate_survey'] = array( 148 'description' => t('Affiliate user survey'), 149 'fields' => array( 150 'sid' => array( 151 'description' => t('affiliate application id'), 152 'type' => 'serial', 153 'unsigned' => TRUE, 154 'not null' => TRUE, 155 ), 156 'aaid' => array( 157 'description' => t('affiliate application id'), 158 'type' => 'int', 159 'unsigned' => TRUE, 160 'not null' => TRUE, 161 ), 162 'affiliate_survey_date' => array( 163 'description' => t('creation date'), 164 'mysql_type' => 'timestamp', 165 'type' => 'datetime', 166 'not null' => TRUE, 167 'default' => 'CURRENT_TIMESTAMP', 168 ), 169 'affiliate_survey_indiv' => array( 170 'description' => t('survey individuals'), 171 'type' => 'int', 172 'not null' => TRUE, 173 ), 174 'affiliate_survey_hosp' => array( 175 'description' => t('survey hospitals'), 176 'type' => 'int', 177 'not null' => TRUE, 178 ), 179 'affiliate_survey_lic_beds' => array( 180 'description' => t('survey lic beds'), 181 'type' => 'int', 182 'not null' => TRUE, 183 ), 184 'affiliate_survey_nurse_homes' => array( 185 'description' => t('survey nurse homes'), 186 'type' => 'int', 187 'not null' => TRUE, 188 ), 189 'affiliate_survey_nurse_or_resid_units' => array( 190 'description' => t('survey nurse - resid units'), 191 'type' => 'int', 192 'not null' => TRUE, 193 ), 194 'affiliate_survey_have_website' => array( 195 'description' => t('survey has website'), 196 'type' => 'int', 197 'size' => 'tiny', 198 'not null' => TRUE, 199 ), 200 'affiliate_survey_website_users' => array( 201 'description' => t('survey website reg users'), 202 'type' => 'int', 203 'not null' => TRUE, 204 ), 205 'affiliate_survey_total_users' => array( 206 'description' => t('survey total users'), 207 'type' => 'int', 208 'not null' => TRUE, 209 ), 210 'affiliate_survey_acc_sat' => array( 211 'description' => t('TODO: please describe this field!'), 212 'type' => 'int', 213 'size' => 'tiny', 214 'not null' => TRUE, 215 ), 216 'affiliate_survey_acc_ftp' => array( 217 'description' => t('TODO: please describe this field!'), 218 'type' => 'int', 219 'size' => 'tiny', 220 'not null' => TRUE, 221 ), 222 'affiliate_survey_acc_stream' => array( 223 'description' => t('TODO: please describe this field!'), 224 'type' => 'int', 225 'size' => 'tiny', 226 'not null' => TRUE, 227 ), 228 'affiliate_survey_prog_daily' => array( 229 'description' => t('TODO: please describe this field!'), 230 'type' => 'int', 231 'not null' => TRUE, 232 ), 233 'affiliate_survey_prog_names' => array( 234 'description' => t('TODO: please describe this field!'), 235 'type' => 'text', 236 'size' => 'big', 237 'not null' => TRUE, 238 ), 239 'affiliate_survey_additions' => array( 240 'description' => t('TODO: please describe this field!'), 241 'type' => 'text', 242 'size' => 'big', 243 'not null' => TRUE, 244 ), 245 'affiliate_survey_comments' => array( 246 'description' => t('TODO: please describe this field!'), 247 'type' => 'text', 248 'size' => 'big', 249 'not null' => TRUE, 250 ), 251 ), 252 'primary key' => array('sid'), 253 'indexes' => array( 254 'aaid' => array('aaid'), 255 ), 256 ); 257 return $schema; 258 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |