Refine CRUD for artists

This commit is contained in:
2025-06-25 17:04:45 +02:00
parent 887b0ead93
commit d608267a62
11 changed files with 323 additions and 13 deletions

View File

@ -0,0 +1,21 @@
/*
Warnings:
- You are about to drop the column `icon` on the `Social` table. All the data in the column will be lost.
- You are about to drop the column `name` on the `Social` table. All the data in the column will be lost.
- You are about to drop the column `type` on the `Social` table. All the data in the column will be lost.
- You are about to drop the column `url` on the `Social` table. All the data in the column will be lost.
- Added the required column `isPrimary` to the `Social` table without a default value. This is not possible if the table is not empty.
- Added the required column `platform` to the `Social` table without a default value. This is not possible if the table is not empty.
- Made the column `handle` on table `Social` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "Social" DROP COLUMN "icon",
DROP COLUMN "name",
DROP COLUMN "type",
DROP COLUMN "url",
ADD COLUMN "isPrimary" BOOLEAN NOT NULL,
ADD COLUMN "link" TEXT,
ADD COLUMN "platform" TEXT NOT NULL,
ALTER COLUMN "handle" SET NOT NULL;

View File

@ -70,11 +70,11 @@ model Social {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
handle String?
url String?
type String?
icon String?
platform String
handle String
isPrimary Boolean
link String?
artistId String?
artist Artist? @relation(fields: [artistId], references: [id])