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