|
Lines 2654-2668
CREATE TABLE `fieldmapping` ( -- koha to keyword mapping
Link Here
|
| 2654 |
PRIMARY KEY (`id`) |
2654 |
PRIMARY KEY (`id`) |
| 2655 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2655 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2656 |
|
2656 |
|
| 2657 |
--- |
2657 |
-- |
| 2658 |
--- 'Ratings' table. This tracks the star ratings set by borrowers. |
2658 |
-- 'Ratings' table. This tracks the star ratings set by borrowers. |
| 2659 |
--- |
2659 |
-- |
| 2660 |
|
2660 |
|
| 2661 |
DROP TABLE IF EXISTS `ratings`; |
2661 |
DROP TABLE IF EXISTS `ratings`; |
| 2662 |
CREATE TABLE `ratings` ( |
2662 |
CREATE TABLE `ratings` ( |
| 2663 |
`borrowernumber` int(11) NOT NULL, --- the borrower this rating is for |
2663 |
`borrowernumber` int(11) NOT NULL, -- the borrower this rating is for |
| 2664 |
`biblionumber` int(11) NOT NULL, --- the biblio it's for |
2664 |
`biblionumber` int(11) NOT NULL, -- the biblio it's for |
| 2665 |
`value` tinyint(1) NOT NULL, --- the rating, from 1-5 |
2665 |
`value` tinyint(1) NOT NULL, -- the rating, from 1-5 |
| 2666 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, |
2666 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, |
| 2667 |
PRIMARY KEY (`borrowernumber`,`biblionumber`), |
2667 |
PRIMARY KEY (`borrowernumber`,`biblionumber`), |
| 2668 |
KEY `ratings_borrowers_fk_1` (`borrowernumber`), |
2668 |
KEY `ratings_borrowers_fk_1` (`borrowernumber`), |
| 2669 |
- |
|
|