mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
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:
parent
3f3cf702b2
commit
2eb7fef027
2 changed files with 0 additions and 5 deletions
|
@ -1,9 +1,7 @@
|
||||||
CREATE TABLE `GitCommits` (
|
CREATE TABLE `GitCommits` (
|
||||||
`GitCommitId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`EbookId` int(10) unsigned NOT NULL,
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
`Created` datetime NOT NULL,
|
`Created` datetime NOT NULL,
|
||||||
`Message` text NOT NULL,
|
`Message` text NOT NULL,
|
||||||
`Hash` char(40) NOT NULL,
|
`Hash` char(40) NOT NULL,
|
||||||
PRIMARY KEY (`GitCommitId`),
|
|
||||||
KEY `index1` (`EbookId`)
|
KEY `index1` (`EbookId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
use Safe\DateTimeImmutable;
|
use Safe\DateTimeImmutable;
|
||||||
|
|
||||||
class GitCommit{
|
class GitCommit{
|
||||||
public ?int $GitCommitId = null;
|
|
||||||
public ?int $EbookId = null;
|
public ?int $EbookId = null;
|
||||||
public DateTimeImmutable $Created;
|
public DateTimeImmutable $Created;
|
||||||
public string $Message;
|
public string $Message;
|
||||||
|
@ -85,7 +84,5 @@ class GitCommit{
|
||||||
?,
|
?,
|
||||||
?)
|
?)
|
||||||
', [$this->EbookId, $this->Created, $this->Message, $this->Hash]);
|
', [$this->EbookId, $this->Created, $this->Message, $this->Hash]);
|
||||||
|
|
||||||
$this->GitCommitId = Db::GetLastInsertedId();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue