View | Details | Raw Unified | Return to bug 9021
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_9021.sql (-1 / +3 lines)
Lines 8-12 CREATE TABLE sms_providers ( Link Here
8
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
8
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
9
9
10
ALTER TABLE borrowers ADD sms_provider_id INT( 11 ) NULL DEFAULT NULL AFTER smsalertnumber;
10
ALTER TABLE borrowers ADD sms_provider_id INT( 11 ) NULL DEFAULT NULL AFTER smsalertnumber;
11
ALTER TABLE borrowers ADD FOREIGN KEY ( sms_provider_id ) REFERENCES sms_providers ( id ) ON UPDATE CASCADE ON DELETE SET NULL;
11
12
12
ALTER TABLE borrowers ADD FOREIGN KEY ( sms_provider_id ) REFERENCES sms_providers ( id );
13
ALTER TABLE deletedborrowers ADD sms_provider_id INT( 11 ) NULL DEFAULT NULL AFTER smsalertnumber;
14
ALTER TABLE deletedborrowers ADD FOREIGN KEY ( sms_provider_id ) REFERENCES sms_providers ( id ) ON UPDATE CASCADE ON DELETE SET NULL;
(-)a/installer/data/mysql/kohastructure.sql (-4 / +5 lines)
Lines 277-284 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
277
  KEY `othernames_idx` (`othernames`(255)),
277
  KEY `othernames_idx` (`othernames`(255)),
278
  KEY `sms_provider_id` (`sms_provider_id`),
278
  KEY `sms_provider_id` (`sms_provider_id`),
279
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
279
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
280
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
280
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`),
281
  CONSTRAINT `borrowers_ibfk_3` FOREIGN KEY (`sms_provider_id`) REFERENCES `sms_providers` (`id`)
281
  CONSTRAINT `borrowers_ibfk_3` FOREIGN KEY (`sms_provider_id`) REFERENCES `sms_providers` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
282
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
282
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
283
283
284
--
284
--
Lines 914-923 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
914
  `altcontactcountry` text default NULL, -- the country for the alternate contact for the patron/borrower
914
  `altcontactcountry` text default NULL, -- the country for the alternate contact for the patron/borrower
915
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
915
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
916
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on)
916
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on)
917
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
917
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
918
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
918
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
919
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
919
  KEY borrowernumber (borrowernumber),
920
  KEY borrowernumber (borrowernumber),
920
  KEY `cardnumber` (`cardnumber`)
921
  KEY `cardnumber` (`cardnumber`),
922
  KEY `sms_provider_id` (`sms_provider_id`)
921
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
923
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
922
924
923
--
925
--
924
- 

Return to bug 9021