mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
fix: constraint error when deleting channel
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "StreamKey" DROP CONSTRAINT "StreamKey_channelId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "StreamKey" ADD CONSTRAINT "StreamKey_channelId_fkey" FOREIGN KEY ("channelId") REFERENCES "Channel"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -109,7 +109,7 @@ model StreamKey {
|
||||
key String @unique
|
||||
|
||||
channelId String @unique
|
||||
channel Channel @relation(fields: [channelId], references: [id])
|
||||
channel Channel @relation(fields: [channelId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model BotAccount {
|
||||
|
||||
Reference in New Issue
Block a user