From: Rob Thorne Date: Wed, 29 Apr 2015 16:27:54 +0000 (+0000) Subject: CRM-16367 (Payment): Added upgrader template for 4.6.3 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b324eacea252b1ce71bf43e7bfa1bc3795ac55c9;p=civicrm-core.git CRM-16367 (Payment): Added upgrader template for 4.6.3 --- diff --git a/CRM/Upgrade/Incremental/sql/4.6.3.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.3.mysql.tpl index fb9c964c29..c496abe13d 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.3.mysql.tpl @@ -1 +1,31 @@ {* file to handle db changes in 4.6.3 during upgrade *} + + +-- +-- CRM-16367: adding the shared payment token table +-- +CREATE TABLE `civicrm_payment_token` ( + + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Payment Token ID', + `contact_id` int unsigned NOT NULL COMMENT 'FK to Contact ID for the owner of the token', + `payment_processor_id` int unsigned NOT NULL , + `token` varchar(255) NOT NULL COMMENT 'Externally provided token string', + `created_date` timestamp COMMENT 'Date created', + `created_id` int unsigned COMMENT 'Contact ID of token creator', + `expiry_date` datetime COMMENT 'Date this token expires', + `email` varchar(255) COMMENT 'Email at the time of token creation. Useful for fraud forensics', + `billing_first_name` varchar(255) COMMENT 'Billing first name at the time of token creation. Useful for fraud forensics', + `billing_middle_name` varchar(255) COMMENT 'Billing middle name at the time of token creation. Useful for fraud forensics', + `billing_last_name` varchar(255) COMMENT 'Billing last name at the time of token creation. Useful for fraud forensics', + `masked_account_number` varchar(255) COMMENT 'Holds the part of the card number or account details that may be retained or displayed', + `ip_address` varchar(255) COMMENT 'IP used when creating the token. Useful for fraud forensics', + PRIMARY KEY ( `id` ), + CONSTRAINT FK_civicrm_payment_token_contact_id FOREIGN KEY (`contact_id`) + REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE, + CONSTRAINT FK_civicrm_payment_token_payment_processor_id FOREIGN KEY (`payment_processor_id`) + REFERENCES `civicrm_payment_processor`(`id`) ON DELETE RESTRICT, + CONSTRAINT FK_civicrm_payment_token_created_id FOREIGN KEY (`created_id`) + REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL + +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; +