mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 02:21:55 -04:00
Add new indices for deleting unused records
This commit is contained in:
parent
18420fdbd9
commit
5c8315e6ff
3 changed files with 6 additions and 3 deletions
|
@ -3,5 +3,6 @@ CREATE TABLE IF NOT EXISTS `CollectionEbooks` (
|
||||||
`CollectionId` int(10) unsigned NOT NULL,
|
`CollectionId` int(10) unsigned NOT NULL,
|
||||||
`SequenceNumber` int(10) unsigned NULL,
|
`SequenceNumber` int(10) unsigned NULL,
|
||||||
`SortOrder` tinyint(3) unsigned NOT NULL,
|
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||||
UNIQUE KEY `idxUnique` (`EbookId`,`CollectionId`)
|
UNIQUE KEY `idxUnique` (`EbookId`,`CollectionId`),
|
||||||
|
KEY `index1` (`CollectionId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -2,5 +2,6 @@ CREATE TABLE IF NOT EXISTS `EbookLocSubjects` (
|
||||||
`EbookId` int(10) unsigned NOT NULL,
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
`LocSubjectId` int(10) unsigned NOT NULL,
|
`LocSubjectId` int(10) unsigned NOT NULL,
|
||||||
`SortOrder` tinyint(3) unsigned NOT NULL,
|
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||||
UNIQUE KEY `idxUnique` (`EbookId`,`LocSubjectId`)
|
UNIQUE KEY `idxUnique` (`EbookId`,`LocSubjectId`),
|
||||||
|
KEY `index1` (`LocSubjectId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -2,5 +2,6 @@ CREATE TABLE IF NOT EXISTS `EbookTags` (
|
||||||
`EbookId` int(10) unsigned NOT NULL,
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
`TagId` int(10) unsigned NOT NULL,
|
`TagId` int(10) unsigned NOT NULL,
|
||||||
`SortOrder` tinyint(3) unsigned NOT NULL,
|
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||||
UNIQUE KEY `idxUnique` (`EbookId`,`TagId`)
|
UNIQUE KEY `idxUnique` (`EbookId`,`TagId`),
|
||||||
|
KEY `index1` (`TagId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue