From b59aa0512a14730c3deff5e5e1a11a32054b3631 Mon Sep 17 00:00:00 2001 From: Spine Date: Tue, 2 Sep 2025 05:34:04 +0000 Subject: [PATCH] kill the last traces of the funky artist Importance nonsense --- ...0902000000_drop_artist_role_importance.php | 31 +++++++++++++++++++ tests/phpunit/ArtistTest.php | 8 ++--- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 misc/my2-migrations/20250902000000_drop_artist_role_importance.php diff --git a/misc/my2-migrations/20250902000000_drop_artist_role_importance.php b/misc/my2-migrations/20250902000000_drop_artist_role_importance.php new file mode 100644 index 000000000..9c43b3677 --- /dev/null +++ b/misc/my2-migrations/20250902000000_drop_artist_role_importance.php @@ -0,0 +1,31 @@ +query(" + alter table artist_usage drop column role + "); + $this->query(" + alter table requests_artists drop column Importance + "); + $this->query(" + alter table torrents_artists drop column Importance + "); + } + + public function down(): void { + $this->query(" + alter table artist_usage add column role enum ('1','2','3','4','5','6','7','8') + "); + $this->query(" + alter table requests_artists add column Importance enum('1','2','3','4','5','6','7','8') + "); + $this->query(" + alter table torrents_artists add column Importance enum('1','2','3','4','5','6','7','8') + "); + } +} diff --git a/tests/phpunit/ArtistTest.php b/tests/phpunit/ArtistTest.php index fddbe8626..e22e0a347 100644 --- a/tests/phpunit/ArtistTest.php +++ b/tests/phpunit/ArtistTest.php @@ -45,11 +45,11 @@ class ArtistTest extends TestCase { $artist = $manager->create('phpunit.' . randomString(12)); $this->artistIdList[] = $artist->id; - (DB::DB())->prepared_query(" + DB::DB()->prepared_query(" INSERT INTO artist_usage - (artist_id, role, uses) - VALUES (?, ?, ?) - ", $artist->id, '1', RANDOM_ARTIST_MIN_ENTRIES + (artist_id, artist_role_id, uses) + VALUES (?, ?, ?) + ", $artist->id, 1, RANDOM_ARTIST_MIN_ENTRIES ); // If the following test fails locally: // before test run: TRUNCATE TABLE artist_usage;