Added database controls for Paypal module

This commit is contained in:
moodler 2004-08-19 09:35:16 +00:00
parent 9b720f926a
commit f7052e9117
4 changed files with 83 additions and 0 deletions

19
enrol/paypal/db/mysql.php Normal file
View File

@ -0,0 +1,19 @@
<?PHP //$Id$
// MySQL commands for upgrading this enrolment module
function paypal_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
if ($oldversion == 0) {
$result = modify_database("$CFG->dirroot/enrol/paypal/db/mysql.sql");
}
return $result;
}
?>

23
enrol/paypal/db/mysql.sql Normal file
View File

@ -0,0 +1,23 @@
CREATE TABLE `enrol_paypal` (
`id` int(10) unsigned NOT NULL auto_increment,
`business` varchar(255) NOT NULL default '',
`receiver_email` varchar(255) NOT NULL default '',
`receiver_id` varchar(255) NOT NULL default '',
`item_name` varchar(255) NOT NULL default '',
`courseid` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
`memo` varchar(255) NOT NULL default '',
`tax` varchar(255) NOT NULL default '',
`option_name1` varchar(255) NOT NULL default '',
`option_selection1_x` varchar(255) NOT NULL default '',
`option_name2` varchar(255) NOT NULL default '',
`option_selection2_x` varchar(255) NOT NULL default '',
`payment_status` varchar(255) NOT NULL default '',
`pending_reason` varchar(255) NOT NULL default '',
`reason_code` varchar(30) NOT NULL default '',
`txn_id` varchar(255) NOT NULL default '',
`parent_txn_id` varchar(255) NOT NULL default '',
`payment_type` varchar(30) NOT NULL default '',
`timeupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Holds all known information about Paypal transactions' ;

View File

@ -0,0 +1,19 @@
<?PHP //$Id$
// PostgreSQL commands for upgrading this enrolment module
function paypal_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
if ($oldversion == 0) {
$result = modify_database("$CFG->dirroot/enrol/paypal/db/postgres7.sql");
}
return $result;
}
?>

View File

@ -0,0 +1,22 @@
CREATE TABLE prefix_enrol_paypal (
id SERIAL PRIMARY KEY,
business varchar(255) NOT NULL default '',
receiver_email varchar(255) NOT NULL default '',
receiver_id varchar(255) NOT NULL default '',
item_name varchar(255) NOT NULL default '',
courseid integer NOT NULL default '0',
userid integer NOT NULL default '0',
memo varchar(255) NOT NULL default '',
tax varchar(255) NOT NULL default '',
option_name1 varchar(255) NOT NULL default '',
option_selection1_x varchar(255) NOT NULL default '',
option_name2 varchar(255) NOT NULL default '',
option_selection2_x varchar(255) NOT NULL default '',
payment_status varchar(255) NOT NULL default '',
pending_reason varchar(255) NOT NULL default '',
reason_code varchar(30) NOT NULL default '',
txn_id varchar(255) NOT NULL default '',
parent_txn_id varchar(255) NOT NULL default '',
payment_type varchar(30) NOT NULL default '',
timeupdated integer NOT NULL default '0'
);