1
0
forked from noxious/server

Renamed hair > characterHair

This commit is contained in:
2024-11-24 15:13:28 +01:00
parent 1017013032
commit 1839bd9a22
5 changed files with 28 additions and 13 deletions

View File

@ -0,0 +1,15 @@
/*
Warnings:
- You are about to drop the column `hairId` on the `Character` table. All the data in the column will be lost.
*/
-- DropForeignKey
ALTER TABLE `Character` DROP FOREIGN KEY `Character_hairId_fkey`;
-- AlterTable
ALTER TABLE `Character` DROP COLUMN `hairId`,
ADD COLUMN `characterHairId` INTEGER NULL;
-- AddForeignKey
ALTER TABLE `Character` ADD CONSTRAINT `Character_characterHairId_fkey` FOREIGN KEY (`characterHairId`) REFERENCES `CharacterHair`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -68,12 +68,12 @@ model Character {
positionX Int @default(0)
positionY Int @default(0)
rotation Int @default(0)
zoneId Int @default(1)
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
characterTypeId Int?
characterType CharacterType? @relation(fields: [characterTypeId], references: [id], onDelete: Cascade)
hairId Int?
hair CharacterHair? @relation(fields: [hairId], references: [id], onDelete: Cascade)
characterHairId Int?
characterHair CharacterHair? @relation(fields: [characterHairId], references: [id], onDelete: Cascade)
zoneId Int @default(1)
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
chats Chat[]
items CharacterItem[]
}