diff --git a/prisma/migrations/20240704113526_init/migration.sql b/prisma/migrations/20240706203202_init/migration.sql similarity index 97% rename from prisma/migrations/20240704113526_init/migration.sql rename to prisma/migrations/20240706203202_init/migration.sql index 0f1f8a4..fe8bc5a 100644 --- a/prisma/migrations/20240704113526_init/migration.sql +++ b/prisma/migrations/20240706203202_init/migration.sql @@ -2,8 +2,8 @@ CREATE TABLE `Object` ( `id` VARCHAR(191) NOT NULL, `name` VARCHAR(191) NOT NULL, - `origin_x` INTEGER NOT NULL DEFAULT 0, - `origin_y` INTEGER NOT NULL DEFAULT 0, + `origin_x` DECIMAL(65, 30) NOT NULL DEFAULT 0, + `origin_y` DECIMAL(65, 30) NOT NULL DEFAULT 0, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 4f91978..54f272c 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -20,13 +20,13 @@ datasource db { } model Object { - id String @id @default(uuid()) - name String - origin_x Int @default(0) - origin_y Int @default(0) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - ZoneObject ZoneObject[] + id String @id @default(uuid()) + name String + origin_x Decimal @default(0) + origin_y Decimal @default(0) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + ZoneObject ZoneObject[] } model Item { @@ -75,8 +75,8 @@ model CharacterItem { } model TileTag { - tile String @id - tags Json + tile String @id + tags Json } model Zone { @@ -94,9 +94,9 @@ model Zone { } model ZoneObject { - id Int @id @default(autoincrement()) + id Int @id @default(autoincrement()) zoneId Int - zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade) + zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade) objectId String object Object @relation(fields: [objectId], references: [id]) position_x Int