DB updates, removed all CRUD func's from repositories as prisma's func's are sufficient and reduces boilerplate.
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `Character` MODIFY `position_x` INTEGER NOT NULL DEFAULT 0,
|
||||
MODIFY `position_y` INTEGER NOT NULL DEFAULT 0,
|
||||
MODIFY `rotation` INTEGER NOT NULL DEFAULT 0,
|
||||
MODIFY `zoneId` INTEGER NOT NULL DEFAULT 1;
|
12
prisma/migrations/20240722001138_field_updates/migration.sql
Normal file
12
prisma/migrations/20240722001138_field_updates/migration.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `Item` MODIFY `description` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `Zone` MODIFY `width` INTEGER NOT NULL DEFAULT 10,
|
||||
MODIFY `height` INTEGER NOT NULL DEFAULT 10,
|
||||
MODIFY `tiles` JSON NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `ZoneObject` MODIFY `depth` INTEGER NOT NULL DEFAULT 0,
|
||||
MODIFY `position_x` INTEGER NOT NULL DEFAULT 0,
|
||||
MODIFY `position_y` INTEGER NOT NULL DEFAULT 0;
|
@ -59,7 +59,7 @@ model Object {
|
||||
model Item {
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
description String
|
||||
description String?
|
||||
stackable Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@ -83,10 +83,10 @@ model Character {
|
||||
level Int @default(1)
|
||||
experience Int @default(0)
|
||||
role String @default("player")
|
||||
position_x Int
|
||||
position_y Int
|
||||
rotation Int
|
||||
zoneId Int
|
||||
position_x Int @default(0)
|
||||
position_y Int @default(0)
|
||||
rotation Int @default(0)
|
||||
zoneId Int @default(1)
|
||||
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
|
||||
chats Chat[]
|
||||
items CharacterItem[]
|
||||
@ -104,9 +104,9 @@ model CharacterItem {
|
||||
model Zone {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
width Int
|
||||
height Int
|
||||
tiles Json
|
||||
width Int @default(10)
|
||||
height Int @default(10)
|
||||
tiles Json?
|
||||
pvp Boolean @default(false)
|
||||
zoneEventTiles ZoneEventTile[]
|
||||
zoneObjects ZoneObject[]
|
||||
@ -122,9 +122,9 @@ model ZoneObject {
|
||||
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
|
||||
objectId String
|
||||
object Object @relation(fields: [objectId], references: [id], onDelete: Cascade)
|
||||
depth Int
|
||||
position_x Int
|
||||
position_y Int
|
||||
depth Int @default(0)
|
||||
position_x Int @default(0)
|
||||
position_y Int @default(0)
|
||||
}
|
||||
|
||||
enum ZoneEventTileType {
|
||||
|
Reference in New Issue
Block a user