|
Lines 190-210
DROP TABLE IF EXISTS `additional_contents`;
Link Here
|
| 190 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
190 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 191 |
/*!40101 SET character_set_client = utf8 */; |
191 |
/*!40101 SET character_set_client = utf8 */; |
| 192 |
CREATE TABLE `additional_contents` ( |
192 |
CREATE TABLE `additional_contents` ( |
| 193 |
`idnew` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'unique identifier for the additional content', |
193 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'unique identifier for the additional content category', |
| 194 |
`category` varchar(20) NOT NULL COMMENT 'category for the additional content', |
194 |
`category` varchar(20) NOT NULL COMMENT 'category for the additional content', |
| 195 |
`code` varchar(100) NOT NULL COMMENT 'code to group content per lang', |
195 |
`code` varchar(100) NOT NULL COMMENT 'code to group content per lang', |
| 196 |
`location` varchar(255) NOT NULL COMMENT 'location of the additional content', |
196 |
`location` varchar(255) NOT NULL COMMENT 'location of the additional content', |
| 197 |
`branchcode` varchar(10) DEFAULT NULL COMMENT 'branch code users to create branch specific additional content, NULL is every branch.', |
197 |
`branchcode` varchar(10) DEFAULT NULL COMMENT 'branch code users to create branch specific additional content, NULL is every branch.', |
| 198 |
`title` varchar(250) NOT NULL DEFAULT '' COMMENT 'title of the additional content', |
|
|
| 199 |
`content` mediumtext NOT NULL COMMENT 'the body of your additional content', |
| 200 |
`lang` varchar(50) NOT NULL DEFAULT '' COMMENT 'location for the additional content(koha is the staff interface, slip is the circulation receipt and language codes are for the opac)', |
| 201 |
`published_on` date DEFAULT NULL COMMENT 'publication date', |
198 |
`published_on` date DEFAULT NULL COMMENT 'publication date', |
| 202 |
`updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'last modification', |
199 |
`updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'last modification', |
| 203 |
`expirationdate` date DEFAULT NULL COMMENT 'date the additional content is set to expire or no longer be visible', |
200 |
`expirationdate` date DEFAULT NULL COMMENT 'date the additional content is set to expire or no longer be visible', |
| 204 |
`number` int(11) DEFAULT NULL COMMENT 'the order in which this additional content appears in that specific location', |
201 |
`number` int(11) DEFAULT NULL COMMENT 'the order in which this additional content appears in that specific location', |
| 205 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'The user who created the additional content', |
202 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'The user who created the additional content', |
| 206 |
PRIMARY KEY (`idnew`), |
203 |
PRIMARY KEY (`id`), |
| 207 |
UNIQUE KEY `additional_contents_uniq` (`category`,`code`,`branchcode`,`lang`), |
204 |
UNIQUE KEY `additional_contents_uniq` (`category`,`code`,`branchcode`), |
| 208 |
KEY `additional_contents_borrowernumber_fk` (`borrowernumber`), |
205 |
KEY `additional_contents_borrowernumber_fk` (`borrowernumber`), |
| 209 |
KEY `additional_contents_branchcode_ibfk` (`branchcode`), |
206 |
KEY `additional_contents_branchcode_ibfk` (`branchcode`), |
| 210 |
CONSTRAINT `additional_contents_branchcode_ibfk` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
207 |
CONSTRAINT `additional_contents_branchcode_ibfk` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
Lines 212-217
CREATE TABLE `additional_contents` (
Link Here
|
| 212 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
209 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 213 |
/*!40101 SET character_set_client = @saved_cs_client */; |
210 |
/*!40101 SET character_set_client = @saved_cs_client */; |
| 214 |
|
211 |
|
|
|
212 |
CREATE TABLE `additional_contents_localizations` ( |
| 213 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'unique identifier for the additional content', |
| 214 |
`additional_content_id` int(10) unsigned NOT NULL COMMENT 'link to the additional content', |
| 215 |
`title` varchar(250) NOT NULL DEFAULT '' COMMENT 'title of the additional content', |
| 216 |
`content` mediumtext NOT NULL COMMENT 'the body of your additional content', |
| 217 |
`lang` varchar(50) NOT NULL DEFAULT '' COMMENT 'lang', |
| 218 |
PRIMARY KEY (`id`), |
| 219 |
UNIQUE KEY `additional_contents_localizations_uniq` (`additional_content_id`,`lang`), |
| 220 |
CONSTRAINT `additional_contents_localizations_ibfk1` FOREIGN KEY (`additional_content_id`) REFERENCES `additional_contents` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
| 221 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 222 |
/*!40101 SET character_set_client = @saved_cs_client */; |
| 223 |
|
| 215 |
-- |
224 |
-- |
| 216 |
-- Table structure for table `additional_field_values` |
225 |
-- Table structure for table `additional_field_values` |
| 217 |
-- |
226 |
-- |
| 218 |
- |
|
|