mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
switch artist_usage pk from role to artist_role_id
This commit is contained in:
25
misc/my-migrations/20250619000000_artist_usage_pkey.php
Normal file
25
misc/my-migrations/20250619000000_artist_usage_pkey.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class ArtistUsagePkey extends AbstractMigration {
|
||||
public function up(): void {
|
||||
$this->query("
|
||||
alter table artist_usage
|
||||
drop primary key,
|
||||
add primary key (artist_id, artist_role_id),
|
||||
modify role enum ('1','2','3','4','5','6','7','8')
|
||||
");
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
$this->query("
|
||||
alter table artist_usage
|
||||
drop primary key,
|
||||
add primary key (artist_id, role),
|
||||
modify role enum ('1','2','3','4','5','6','7','8') NOT NULL
|
||||
");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user