forked from noxious/server
DB relation fix
This commit is contained in:
parent
38bf5c07b6
commit
1fbe621712
@ -0,0 +1,5 @@
|
|||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `ZoneObject` DROP FOREIGN KEY `ZoneObject_objectId_fkey`;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `ZoneObject` ADD CONSTRAINT `ZoneObject_objectId_fkey` FOREIGN KEY (`objectId`) REFERENCES `Object`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
@ -98,7 +98,7 @@ model ZoneObject {
|
|||||||
zoneId Int
|
zoneId Int
|
||||||
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
|
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
|
||||||
objectId String
|
objectId String
|
||||||
object Object @relation(fields: [objectId], references: [id])
|
object Object @relation(fields: [objectId], references: [id], onDelete: Cascade)
|
||||||
depth Int
|
depth Int
|
||||||
position_x Int
|
position_x Int
|
||||||
position_y Int
|
position_y Int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user