/[drupal]/contributions/modules/smsframework/sms.install
ViewVC logotype

Contents of /contributions/modules/smsframework/sms.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Thu Aug 7 18:08:59 2008 UTC (15 months, 3 weeks ago) by diggersf
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
Changes since 1.7: +27 -29 lines
File MIME type: text/x-php
252568: Initial commit for Drupal 6 upgrade. HEAD is now for Drupal 6.
1 <?php
2 // $Id: sms.install,v 1.7 2008/07/30 19:42:56 diggersf Exp $
3 /**
4 * Implementation of hook_install().
5 */
6 function sms_install() {
7 $result = drupal_install_schema('sms');
8 db_query('UPDATE {system} SET weight = -5 WHERE name = "sms_sendtophone"');
9 }
10
11 /**
12 * Implementation of hook_schema().
13 */
14 function sms_schema() {
15 $schema['sms_messages'] = array(
16 'fields' => array(
17 'mid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
18 'sent' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
19 'status' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
20 'destination' => array('type' => 'varchar', 'not null' => TRUE, 'length' => 64),
21 'message' => array('type' => 'text'),
22 'gateway' => array('type' => 'varchar', 'not null' => TRUE, 'length' => 64),
23 ),
24 'primary key' => array('mid'),
25 );
26
27 return $schema;
28 }
29
30 /**
31 * Implementation of hook_uninstall().
32 */
33 function sms_uninstall() {
34 drupal_uninstall_schema('sms');
35 }
36
37 /**
38 * Update: Removes gateway behavior mapping
39 */
40 function sms_update_1() {
41 $ret = array();
42 // Remove table
43 db_drop_table($ret, 'sms_mapping');
44
45 return $ret;
46 }

  ViewVC Help
Powered by ViewVC 1.1.2