|
Lines 3534-3539
CREATE TABLE discharges (
Link Here
|
| 3534 |
CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE |
3534 |
CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE |
| 3535 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3535 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 3536 |
|
3536 |
|
|
|
3537 |
-- |
| 3538 |
-- Table structure for table additional_fields |
| 3539 |
-- This table add the ability to add new fields for a record |
| 3540 |
-- |
| 3541 |
|
| 3542 |
CREATE TABLE `additional_fields` ( |
| 3543 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
| 3544 |
`tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field |
| 3545 |
`name` varchar(255) NOT NULL DEFAULT '', -- name of the field |
| 3546 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', -- is an authorised value category |
| 3547 |
`marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record |
| 3548 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable? |
| 3549 |
PRIMARY KEY (`id`), |
| 3550 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
| 3551 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 3552 |
|
| 3553 |
-- |
| 3554 |
-- Table structure for table additional_field_values |
| 3555 |
-- This table store values for additional fields |
| 3556 |
-- |
| 3557 |
|
| 3558 |
CREATE TABLE `additional_field_values` ( |
| 3559 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
| 3560 |
`field_id` int(11) NOT NULL, -- foreign key references additional_fields(id) |
| 3561 |
`record_id` int(11) NOT NULL, -- record_id |
| 3562 |
`value` varchar(255) NOT NULL DEFAULT '', -- value for this field |
| 3563 |
PRIMARY KEY (`id`), |
| 3564 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
| 3565 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
| 3566 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 3567 |
|
| 3537 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3568 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 3538 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3569 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 3539 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
3570 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
| 3540 |
- |
|
|