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

Contents of /contributions/modules/paypernode/paypernode.install

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


Revision 1.1 - (show annotations) (download) (as text)
Sun Dec 10 19:04:20 2006 UTC (2 years, 11 months ago) by jareyero
Branch: MAIN
Branch point for: DRUPAL-5, DRUPAL-4-7
File MIME type: text/x-php
New pay-per-node module with eCommerce integration.
1 <?php
2 // $Id: tangible.install,v 1.5 2006/05/09 12:23:37 gordon Exp $
3
4 /**
5 * E-Commerce tangible module schema
6 */
7
8 function paypernode_install() {
9 switch ($GLOBALS['db_type']) {
10 case 'mysql':
11 case 'mysqli':
12 db_query("CREATE TABLE {ec_product_paypernode} (
13 nid int(10) unsigned NOT NULL default '0',
14 vid int(10) unsigned NOT NULL default '0',
15 node_type varchar(32) NOT NULL default '',
16 node_qtty int(10) unsigned NOT NULL default '1',
17 PRIMARY KEY vid (vid)
18 );");
19 db_query("CREATE TABLE {ec_paypernode_user} (
20 uid int(10) unsigned NOT NULL default '0',
21 node_type varchar(32) NOT NULL default '',
22 allowed int(10) unsigned NOT NULL default '0',
23 created int(10) unsigned NOT NULL default '0',
24 changed int(11) NOT NULL default '0',
25 PRIMARY KEY user_node_type (uid, node_type)
26 );");
27 break;
28 default:
29 drupal_set_message('You have to create the tables manually for paypernode module');
30 break;
31 }
32 }
33
34 ?>

  ViewVC Help
Powered by ViewVC 1.1.2