/[drupal]/contributions/modules/uc_zpayment/uc_zpayment.install
ViewVC logotype

Contents of /contributions/modules/uc_zpayment/uc_zpayment.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Jan 14 01:41:31 2009 UTC (10 months, 1 week ago) by ibabushka
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA1, DRUPAL-6--1-0, DRUPAL-6--1-1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Initial commit of uc_zpayment module.
1 <?php
2 // $Id$
3
4 function uc_zpayment_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {uc_zpayment_transaction} (
9 txnid int(10) unsigned NOT NULL default '0',
10 amount decimal(6,2) default '0.00',
11 description text,
12 PRIMARY KEY (txnid)
13 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
14 break;
15 case 'pgsql':
16 db_query("CREATE TABLE {uc_zpayment_transaction} (
17 txnid integer NOT NULL default '0',
18 amount decimal(10,2) unsigned NOT NULL default '0',
19 description longtext,
20 PRIMARY KEY (txnid)
21 )");
22 break;
23 }
24
25 drupal_set_message(t('Ubercart: zpayment tables have been created.'));
26 }
27 function uc_zpayment_uninstall() {
28 switch ($GLOBALS['db_type']) {
29 case 'mysql':
30 case 'mysqli':
31 $deleted = db_query("DROP TABLE IF EXISTS {uc_zpayment_transaction}");
32 break;
33
34 case 'pgsql':
35 $deleted = db_query('DROP TABLE {uc_zpayment_transaction}');
36 break;
37 }
38 }
39

  ViewVC Help
Powered by ViewVC 1.1.2