Remove primary key ContributorId

`Ebook` to `Contributor` is one to many, and we don't query by ContributorId.
The table already has a SortOrder column, and we use that to order the queries.
This commit is contained in:
Mike Colagrosso 2024-10-13 21:06:08 -06:00 committed by Alex Cabal
parent 1076c9a77d
commit 3f3cf702b2
3 changed files with 4 additions and 9 deletions

View file

@ -5,7 +5,6 @@ use Safe\DateTimeImmutable;
use function Safe\preg_match;
class Contributor{
public ?int $ContributorId = null;
public ?int $EbookId = null;
public string $Name;
public string $UrlName;
@ -136,7 +135,5 @@ class Contributor{
?)
', [$this->EbookId, $this->Name, $this->UrlName, $this->SortName, $this->WikipediaUrl, $this->MarcRole, $this->FullName,
$this->NacoafUrl, $this->SortOrder]);
$this->ContributorId = Db::GetLastInsertedId();
}
}