Lines 1122-1127
CREATE TABLE `biblio_framework` (
Link Here
|
1122 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1122 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1123 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1123 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1124 |
|
1124 |
|
|
|
1125 |
-- |
1126 |
-- Table structure for table `record_sources` |
1127 |
-- |
1128 |
|
1129 |
DROP TABLE IF EXISTS `record_sources`; |
1130 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
1131 |
/*!40101 SET character_set_client = utf8 */; |
1132 |
CREATE TABLE `record_sources` ( |
1133 |
`record_source_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary key for the `record_sources` table', |
1134 |
`name` text NOT NULL COMMENT 'User defined name for the record source', |
1135 |
`can_be_edited` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If records from this source can be edited', |
1136 |
PRIMARY KEY (`record_source_id`) |
1137 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1138 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1139 |
|
1125 |
-- |
1140 |
-- |
1126 |
-- Table structure for table `biblio_metadata` |
1141 |
-- Table structure for table `biblio_metadata` |
1127 |
-- |
1142 |
-- |
Lines 1136-1145
CREATE TABLE `biblio_metadata` (
Link Here
|
1136 |
`schema` varchar(16) NOT NULL, |
1151 |
`schema` varchar(16) NOT NULL, |
1137 |
`metadata` longtext NOT NULL, |
1152 |
`metadata` longtext NOT NULL, |
1138 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
1153 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|
|
1154 |
`record_source_id` int(11) NULL DEFAULT NULL COMMENT 'The record source for the metadata', |
1139 |
PRIMARY KEY (`id`), |
1155 |
PRIMARY KEY (`id`), |
1140 |
UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), |
1156 |
UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), |
1141 |
KEY `timestamp` (`timestamp`), |
1157 |
KEY `timestamp` (`timestamp`), |
1142 |
CONSTRAINT `record_metadata_fk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1158 |
CONSTRAINT `record_metadata_fk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
1159 |
CONSTRAINT `record_metadata_fk_2` FOREIGN KEY (`record_source_id`) REFERENCES `record_sources` (`record_source_id`) ON DELETE CASCADE ON UPDATE CASCADE |
1143 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1160 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1144 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1161 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1145 |
|
1162 |
|
Lines 2571-2580
CREATE TABLE `deletedbiblio_metadata` (
Link Here
|
2571 |
`schema` varchar(16) NOT NULL, |
2588 |
`schema` varchar(16) NOT NULL, |
2572 |
`metadata` longtext NOT NULL, |
2589 |
`metadata` longtext NOT NULL, |
2573 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
2590 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|
|
2591 |
`record_source_id` int(11) NULL DEFAULT NULL COMMENT 'The record source for the metadata', |
2574 |
PRIMARY KEY (`id`), |
2592 |
PRIMARY KEY (`id`), |
2575 |
UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), |
2593 |
UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), |
2576 |
KEY `timestamp` (`timestamp`), |
2594 |
KEY `timestamp` (`timestamp`), |
2577 |
CONSTRAINT `deletedrecord_metadata_fk_1` FOREIGN KEY (`biblionumber`) REFERENCES `deletedbiblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE |
2595 |
CONSTRAINT `deletedrecord_metadata_fk_1` FOREIGN KEY (`biblionumber`) REFERENCES `deletedbiblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
2596 |
CONSTRAINT `deletedrecord_metadata_fk_2` FOREIGN KEY (`record_source_id`) REFERENCES `record_sources` (`record_source_id`) ON DELETE CASCADE ON UPDATE CASCADE |
2578 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2597 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2579 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2598 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2580 |
|
2599 |
|