Lines 3504-3509
CREATE TABLE items_search_fields (
Link Here
|
3504 |
ON DELETE SET NULL ON UPDATE CASCADE |
3504 |
ON DELETE SET NULL ON UPDATE CASCADE |
3505 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3505 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3506 |
|
3506 |
|
|
|
3507 |
-- |
3508 |
-- Table structure for table additional_fields |
3509 |
-- This table add the ability to add new fields for a record |
3510 |
-- |
3511 |
|
3512 |
CREATE TABLE `additional_fields` ( |
3513 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
3514 |
`tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field |
3515 |
`name` varchar(255) NOT NULL DEFAULT '', -- name of the field |
3516 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', -- is an authorised value category |
3517 |
`marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record |
3518 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable? |
3519 |
PRIMARY KEY (`id`), |
3520 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
3521 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3522 |
|
3523 |
-- |
3524 |
-- Table structure for table additional_field_values |
3525 |
-- This table store values for additional fields |
3526 |
-- |
3527 |
|
3528 |
CREATE TABLE `additional_field_values` ( |
3529 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
3530 |
`field_id` int(11) NOT NULL, -- foreign key references additional_fields(id) |
3531 |
`record_id` int(11) NOT NULL, -- record_id |
3532 |
`value` varchar(255) NOT NULL DEFAULT '', -- value for this field |
3533 |
PRIMARY KEY (`id`), |
3534 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
3535 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
3536 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3537 |
|
3507 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3538 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3508 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3539 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3509 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
3540 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |