Lines 2203-2209
CREATE TABLE `tags_all` ( -- all of the tags
Link Here
|
2203 |
`tag_id` int(11) NOT NULL auto_increment, -- unique id and primary key |
2203 |
`tag_id` int(11) NOT NULL auto_increment, -- unique id and primary key |
2204 |
`borrowernumber` int(11) DEFAULT NULL, -- the patron who added the tag (borrowers.borrowernumber) |
2204 |
`borrowernumber` int(11) DEFAULT NULL, -- the patron who added the tag (borrowers.borrowernumber) |
2205 |
`biblionumber` int(11) NOT NULL, -- the bib record this tag was left on (biblio.biblionumber) |
2205 |
`biblionumber` int(11) NOT NULL, -- the bib record this tag was left on (biblio.biblionumber) |
2206 |
`term` varchar(255) NOT NULL, -- the tag |
2206 |
`term` varchar(191) NOT NULL COLLATE utf8mb4_bin, -- the tag |
2207 |
`language` int(4) default NULL, -- the language the tag was left in |
2207 |
`language` int(4) default NULL, -- the language the tag was left in |
2208 |
`date_created` datetime NOT NULL, -- the date the tag was added |
2208 |
`date_created` datetime NOT NULL, -- the date the tag was added |
2209 |
PRIMARY KEY (`tag_id`), |
2209 |
PRIMARY KEY (`tag_id`), |
Lines 2221-2227
CREATE TABLE `tags_all` ( -- all of the tags
Link Here
|
2221 |
|
2221 |
|
2222 |
DROP TABLE IF EXISTS `tags_approval`; |
2222 |
DROP TABLE IF EXISTS `tags_approval`; |
2223 |
CREATE TABLE `tags_approval` ( -- approved tags |
2223 |
CREATE TABLE `tags_approval` ( -- approved tags |
2224 |
`term` varchar(191) NOT NULL, -- the tag |
2224 |
`term` varchar(191) NOT NULL COLLATE utf8mb4_bin, -- the tag |
2225 |
`approved` int(1) NOT NULL default '0', -- whether the tag is approved or not (1=yes, 0=pending, -1=rejected) |
2225 |
`approved` int(1) NOT NULL default '0', -- whether the tag is approved or not (1=yes, 0=pending, -1=rejected) |
2226 |
`date_approved` datetime default NULL, -- the date this tag was approved |
2226 |
`date_approved` datetime default NULL, -- the date this tag was approved |
2227 |
`approved_by` int(11) default NULL, -- the librarian who approved the tag (borrowers.borrowernumber) |
2227 |
`approved_by` int(11) default NULL, -- the librarian who approved the tag (borrowers.borrowernumber) |
Lines 2238-2244
CREATE TABLE `tags_approval` ( -- approved tags
Link Here
|
2238 |
|
2238 |
|
2239 |
DROP TABLE IF EXISTS `tags_index`; |
2239 |
DROP TABLE IF EXISTS `tags_index`; |
2240 |
CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are used |
2240 |
CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are used |
2241 |
`term` varchar(191) NOT NULL, -- the tag |
2241 |
`term` varchar(191) NOT NULL COLLATE utf8mb4_bin, -- the tag |
2242 |
`biblionumber` int(11) NOT NULL, -- the bib record this tag was used on (biblio.biblionumber) |
2242 |
`biblionumber` int(11) NOT NULL, -- the bib record this tag was used on (biblio.biblionumber) |
2243 |
`weight` int(9) NOT NULL default '1', -- the number of times this term was used on this bib record |
2243 |
`weight` int(9) NOT NULL default '1', -- the number of times this term was used on this bib record |
2244 |
PRIMARY KEY (`term`,`biblionumber`), |
2244 |
PRIMARY KEY (`term`,`biblionumber`), |
2245 |
- |
|
|