Skip to content
Snippets Groups Projects
Commit 9fa92ebd authored by mattwire's avatar mattwire
Browse files

Don't set unique constraint on contact_id

parent a4ae0650
Branches
Tags
1 merge request!95.1
......@@ -375,7 +375,6 @@ class CRM_Stripe_Upgrader extends CRM_Stripe_Upgrader_Base {
ADD COLUMN `contact_id` int(10) UNSIGNED DEFAULT NULL COMMENT "FK ID from civicrm_contact"');
CRM_Core_DAO::executeQuery('ALTER TABLE `civicrm_stripe_customers`
ADD CONSTRAINT `FK_civicrm_stripe_customers_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE;');
CRM_Core_DAO::executeQuery('ALTER TABLE `civicrm_stripe_customers` ADD UNIQUE (contact_id)');
}
$this->ctx->log->info('Applying Stripe update 5010. Getting Contact IDs for civicrm_stripe_customers.');
......
......@@ -5,7 +5,6 @@
`is_live` tinyint(4) NOT NULL COMMENT 'Whether this is a live or test transaction',
`processor_id` int(10) DEFAULT NULL COMMENT 'ID from civicrm_payment_processor',
UNIQUE KEY `id` (`id`),
UNIQUE KEY `contact_id` (`contact_id`),
CONSTRAINT `FK_civicrm_stripe_customers_contact_id` FOREIGN KEY (`contact_id`)
REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment