Lines 3422-3427
CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec
Link Here
|
3422 |
KEY `record_id` (`record_id`) |
3422 |
KEY `record_id` (`record_id`) |
3423 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
3423 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
3424 |
|
3424 |
|
|
|
3425 |
-- |
3426 |
-- Table structure for table additional_fields |
3427 |
-- This table add the ability to add new fields for a record |
3428 |
-- |
3429 |
|
3430 |
CREATE TABLE `additional_fields` ( |
3431 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
3432 |
`tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field |
3433 |
`name` varchar(255) NOT NULL DEFAULT '', -- name of the field |
3434 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', -- is an authorised value category |
3435 |
`marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record |
3436 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable? |
3437 |
PRIMARY KEY (`id`), |
3438 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
3439 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
3440 |
|
3441 |
-- |
3442 |
-- Table structure for table additional_field_values |
3443 |
-- This table store values for additional fields |
3444 |
-- |
3445 |
|
3446 |
CREATE TABLE `additional_field_values` ( |
3447 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
3448 |
`field_id` int(11) NOT NULL, -- foreign key references additional_fields(id) |
3449 |
`record_id` int(11) NOT NULL, -- record_id |
3450 |
`value` varchar(255) NOT NULL DEFAULT '', -- value for this field |
3451 |
PRIMARY KEY (`id`), |
3452 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
3453 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
3454 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
3455 |
|
3425 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3456 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3426 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3457 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3427 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
3458 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |