paypal_donate.install in Paypal Donation 6
File
paypal_donate.install
View source
<?php
define('PAYPAL_DONATE_VERSION', 1.0);
function paypal_donate_install() {
drupal_install_schema('paypal_donate');
variable_set('paypal_donate_version', PAYPAL_DONATE_VERSION);
}
function paypal_donate_schema() {
$schema = array();
$schema['paypal_donate'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'paypal_account' => array(
'type' => 'varchar',
'length' => '255',
),
),
);
return $schema;
}
function paypal_donate_uninstall() {
drupal_uninstall_schema('paypal_donate');
}
Functions
Name |
Description |
paypal_donate_install |
This hook is triggered when the paypal donate module is being installed.
This function will run only once and gives us the possibility to install
the a required table in the database. |
paypal_donate_schema |
By implementing hook_schema() and specifying the tables your module declares, you can easily create and drop these tables on
all supported database engines. You don't have to deal with the different SQL dialects for table creation and alteration… |
paypal_donate_uninstall |
This hook is triggered when the paypal donate module is being uninstalled.
This function will run only once and gives us the possibility to remove
the a required table in the database. |
Constants