commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / drupal / modules / civicrm_member_roles / civicrm_member_roles.install
1 <?php
2 // $Id: civicrm_member_roles.install,v 1.2.4.2 2008/08/17 21:44:19 posco Exp $
3
4
5 /**
6 * Copyright (C) 2010 Neil Goodman
7 * @license GNU General Public License version 2 or later
8 *
9 * @file
10 * Install CiviMember Role Sync database table and provide hook_uninstall.
11 */
12
13 /**
14 * Implementation of hook_install().
15 */
16 function civicrm_member_roles_install() {}
17
18 /*
19 * Implemenation of hook_enable()
20 */
21 function civicrm_member_roles_enable() {
22 db_query("UPDATE {system} SET weight = 110 WHERE name = 'civicrm_member_roles'");
23 }
24
25 /**
26 * Implementation of hook_schema().
27 */
28 function civicrm_member_roles_schema() {
29 $schema['civicrm_member_roles_rules'] = array(
30 'fields' => array(
31 'rule_id' => array(
32 'type' => 'serial',
33 'not null' => TRUE,
34 ),
35 'rid' => array(
36 'type' => 'int',
37 'unsigned' => TRUE,
38 'not null' => TRUE,
39 ),
40 'type_id' => array(
41 'type' => 'int',
42 'unsigned' => TRUE,
43 'not null' => TRUE,
44 ),
45 'status_codes' => array(
46 'type' => 'text',
47 'not null' => TRUE,
48 ),
49 ),
50 'primary key' => array('rule_id'),
51 );
52
53 return $schema;
54 }
55
56 /**
57 * Implementation of hook_uninstall().
58 */
59 function civicrm_member_roles_uninstall() {
60 variable_del('civicrm_member_roles_sync_method');
61 }
62