diff --git a/config/sql/se/CollectionEbooks.sql b/config/sql/se/CollectionEbooks.sql new file mode 100644 index 00000000..321dd8b5 --- /dev/null +++ b/config/sql/se/CollectionEbooks.sql @@ -0,0 +1,8 @@ +CREATE TABLE `CollectionEbooks` ( + `CollectionEbookId` int(10) unsigned NOT NULL AUTO_INCREMENT, + `EbookId` int(10) unsigned NOT NULL, + `CollectionId` int(10) unsigned NOT NULL, + `SequenceNumber` int(10) unsigned NULL, + PRIMARY KEY (`CollectionEbookId`), + UNIQUE KEY `idxUnique` (`EbookId`,`CollectionId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/config/sql/se/Collections.sql b/config/sql/se/Collections.sql index 4276bd75..84d38dec 100644 --- a/config/sql/se/Collections.sql +++ b/config/sql/se/Collections.sql @@ -1,11 +1,8 @@ CREATE TABLE `Collections` ( `CollectionId` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EbookId` int(10) unsigned NOT NULL, `Name` varchar(255) NOT NULL, `UrlName` varchar(255) NOT NULL, - `SequenceNumber` int(10) unsigned NULL, `Type` varchar(255) NULL, PRIMARY KEY (`CollectionId`), - KEY `index1` (`EbookId`), - KEY `index2` (`UrlName`) + UNIQUE KEY `idxUnique` (`UrlName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;