mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 20:36:38 -04:00
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:
parent
1076c9a77d
commit
3f3cf702b2
3 changed files with 4 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue