From 7c5bb92d5d3dbd4d4495225c54bedbe6a9e8e94d Mon Sep 17 00:00:00 2001 From: Spine Date: Fri, 20 Jun 2025 07:29:48 +0000 Subject: [PATCH] switch artist_usage pk from role to artist_role_id --- .../20250619000000_artist_usage_pkey.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 misc/my-migrations/20250619000000_artist_usage_pkey.php diff --git a/misc/my-migrations/20250619000000_artist_usage_pkey.php b/misc/my-migrations/20250619000000_artist_usage_pkey.php new file mode 100644 index 000000000..83350d55e --- /dev/null +++ b/misc/my-migrations/20250619000000_artist_usage_pkey.php @@ -0,0 +1,25 @@ +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 + "); + } +}