| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* E-Commerce ebay integration module schema
|
| 6 |
*/
|
| 7 |
function ebay_install() {
|
| 8 |
switch ($GLOBALS['db_type']) {
|
| 9 |
case 'mysql':
|
| 10 |
case 'mysqli':
|
| 11 |
db_query("CREATE TABLE {ec_product_ebay} (
|
| 12 |
nid int(10) unsigned NOT NULL default '0',
|
| 13 |
itemid varchar(48) NOT NULL default '',
|
| 14 |
fee decimal(10,2) default '0.00',
|
| 15 |
ebayuserid varchar(32),
|
| 16 |
auctionend tinyint unsigned default '0',
|
| 17 |
buyerfb tinyint unsigned default '0',
|
| 18 |
sellerfb tinyint unsigned default '0',
|
| 19 |
PRIMARY KEY (nid)
|
| 20 |
) TYPE=MyISAM;");
|
| 21 |
|
| 22 |
db_query("CREATE TABLE {ec_ebay_questions} (
|
| 23 |
nid int(10) unsigned NOT NULL default '0',
|
| 24 |
questiontype varchar(32),
|
| 25 |
subject varchar(255) NOT NULL,
|
| 26 |
body text NOT NULL,
|
| 27 |
senderid varchar(64) NOT NULL,
|
| 28 |
senderemail varchar(64) NOT NULL,
|
| 29 |
messagestatus varchar(32),
|
| 30 |
creationdate DATETIME
|
| 31 |
) TYPE=MyISAM;");
|
| 32 |
|
| 33 |
db_query("CREATE TABLE {ec_ebay_categories} (
|
| 34 |
siteid int,
|
| 35 |
categoryname varchar(128),
|
| 36 |
categoryid int,
|
| 37 |
categoryparentid int
|
| 38 |
) TYPE=MyISAM;");
|
| 39 |
break;
|
| 40 |
case 'pgsql':
|
| 41 |
}
|
| 42 |
drupal_set_message(t('E-Commerce: Ebay tables have been created.'));
|
| 43 |
}
|