Style tweaks to artworks DB

This commit is contained in:
Alex Cabal 2024-01-18 10:50:14 -06:00
parent 6e63bd2bdb
commit 2b5f4f55a2
5 changed files with 54 additions and 63 deletions

View file

@ -147,19 +147,4 @@ class Artist extends PropertiesBase{
where ArtistId = ?
', [$this->ArtistId]);
}
public static function DeleteUnreferencedArtists(): void{
Db::Query('
DELETE
from Artists
where ArtistId NOT IN
(SELECT DISTINCT ArtistId FROM Artworks)
');
Db::Query('
DELETE
from ArtistAlternateNames
where ArtistId NOT IN
(SELECT DISTINCT ArtistId FROM Artworks)
');
}
}