projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
[koha.git]
/
installer
/
data
/
mysql
/
kohastructure.sql
diff --git
a/installer/data/mysql/kohastructure.sql
b/installer/data/mysql/kohastructure.sql
index
c361885
..
024039f
100644
(file)
--- a/
installer/data/mysql/kohastructure.sql
+++ b/
installer/data/mysql/kohastructure.sql
@@
-1665,11
+1665,11
@@
CREATE TABLE `patroncards` (
DROP TABLE IF EXISTS `patronimage`;
CREATE TABLE `patronimage` ( -- information related to patron images
DROP TABLE IF EXISTS `patronimage`;
CREATE TABLE `patronimage` ( -- information related to patron images
- `
cardnumber` varchar(16) NOT NULL, -- the cardnumber of the patron this image is attached to (borrowers.card
number)
+ `
borrowernumber` int(11) NOT NULL, -- the borrowernumber of the patron this image is attached to (borrowers.borrower
number)
`mimetype` varchar(15) NOT NULL, -- the format of the image (png, jpg, etc)
`imagefile` mediumblob NOT NULL, -- the image
`mimetype` varchar(15) NOT NULL, -- the format of the image (png, jpg, etc)
`imagefile` mediumblob NOT NULL, -- the image
- PRIMARY KEY (`
card
number`),
- CONSTRAINT `patronimage_fk1` FOREIGN KEY (`
cardnumber`) REFERENCES `borrowers` (`card
number`) ON DELETE CASCADE ON UPDATE CASCADE
+ PRIMARY KEY (`
borrower
number`),
+ CONSTRAINT `patronimage_fk1` FOREIGN KEY (`
borrowernumber`) REFERENCES `borrowers` (`borrower
number`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Table structure for table `pending_offline_operations`
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Table structure for table `pending_offline_operations`