mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Split Collections into two tables
This commit is contained in:
parent
d5748d1006
commit
a25660bc8b
2 changed files with 9 additions and 4 deletions
8
config/sql/se/CollectionEbooks.sql
Normal file
8
config/sql/se/CollectionEbooks.sql
Normal file
|
@ -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;
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue