Remove primary key GitCommitId

The table already has a Created column, and that's the column we use to sort on.
This commit is contained in:
Mike Colagrosso 2024-10-13 21:12:03 -06:00 committed by Alex Cabal
parent 3f3cf702b2
commit 2eb7fef027
2 changed files with 0 additions and 5 deletions

View file

@ -1,9 +1,7 @@
CREATE TABLE `GitCommits` (
`GitCommitId` int(10) unsigned NOT NULL AUTO_INCREMENT,
`EbookId` int(10) unsigned NOT NULL,
`Created` datetime NOT NULL,
`Message` text NOT NULL,
`Hash` char(40) NOT NULL,
PRIMARY KEY (`GitCommitId`),
KEY `index1` (`EbookId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -2,7 +2,6 @@
use Safe\DateTimeImmutable;
class GitCommit{
public ?int $GitCommitId = null;
public ?int $EbookId = null;
public DateTimeImmutable $Created;
public string $Message;
@ -85,7 +84,5 @@ class GitCommit{
?,
?)
', [$this->EbookId, $this->Created, $this->Message, $this->Hash]);
$this->GitCommitId = Db::GetLastInsertedId();
}
}