kill the last traces of the funky artist Importance nonsense

This commit is contained in:
Spine
2025-09-02 05:34:04 +00:00
parent d3a87015b1
commit b59aa0512a
2 changed files with 35 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class DropArtistRoleImportance extends AbstractMigration {
public function up(): void {
$this->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')
");
}
}

View File

@@ -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;