From 850afce72f604e218d2b9f75717968a7f09593cf Mon Sep 17 00:00:00 2001 From: khavinshankar Date: Tue, 5 Sep 2023 08:22:00 +0530 Subject: [PATCH] change preset coords from int to flaot --- .../migration.sql | 5 +++++ prisma/schema.prisma | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 prisma/migrations/20230905024917_alter_preset_coords_datatype/migration.sql diff --git a/prisma/migrations/20230905024917_alter_preset_coords_datatype/migration.sql b/prisma/migrations/20230905024917_alter_preset_coords_datatype/migration.sql new file mode 100644 index 0000000..02b62eb --- /dev/null +++ b/prisma/migrations/20230905024917_alter_preset_coords_datatype/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "Preset" ALTER COLUMN "x" SET DATA TYPE DOUBLE PRECISION, +ALTER COLUMN "y" SET DATA TYPE DOUBLE PRECISION, +ALTER COLUMN "zoom" SET DEFAULT 0.0, +ALTER COLUMN "zoom" SET DATA TYPE DOUBLE PRECISION; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 74efc93..276955d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -47,12 +47,12 @@ model Bed { } model Preset { - id Int @id @default(autoincrement()) - x Int - y Int - zoom Int @default(0) - bed Bed @relation(fields: [bedId], references: [id]) - bedId Int @unique + id Int @id @default(autoincrement()) + x Float + y Float + zoom Float @default(0.0) + bed Bed @relation(fields: [bedId], references: [id]) + bedId Int @unique } model DailyRound {